Skip to content

Commit

Permalink
dropped windows and linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Nov 24, 2024
1 parent 6304250 commit 0a7c5e0
Show file tree
Hide file tree
Showing 31 changed files with 1 addition and 1,622 deletions.
5 changes: 0 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import 'package:go_router/go_router.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:mimir/files.dart';
import 'package:mimir/network/proxy.dart';
import 'package:mimir/platform/windows/windows.dart';
import 'package:mimir/storage/hive/init.dart';
import 'package:mimir/init.dart';
import 'package:mimir/platform/desktop.dart';
import 'package:mimir/school/yellow_pages/entity/contact.dart';
import 'package:path_provider/path_provider.dart';
import 'package:mimir/settings/meta.dart';
Expand Down Expand Up @@ -44,9 +42,6 @@ void main() async {
await InAppWebViewController.setWebContentsDebuggingEnabled(kDebugMode);
}
final prefs = await SharedPreferences.getInstance();
final lastSize = prefs.getLastWindowSize();
await DesktopInit.init(size: lastSize);
await WindowsInit.registerCustomScheme(R.scheme);
final installationTime = prefs.getInstallTime();
debugPrint("First installation time: $installationTime");
if (installationTime == null) {
Expand Down
54 changes: 0 additions & 54 deletions lib/platform/desktop.dart

This file was deleted.

26 changes: 0 additions & 26 deletions lib/platform/windows/win32.dart

This file was deleted.

1 change: 0 additions & 1 deletion lib/platform/windows/win32_web_mock.dart

This file was deleted.

7 changes: 0 additions & 7 deletions lib/platform/windows/windows.dart

This file was deleted.

21 changes: 0 additions & 21 deletions lib/storage/prefs.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import 'dart:ui';

import 'package:shared_preferences/shared_preferences.dart';
import 'package:mimir/r.dart';

class _K {
static const lastVersion = "${R.appId}.lastVersion";
static const lastWindowSize = "${R.appId}.lastWindowSize";
static const installTime = "${R.appId}.installTime";
static const uuid = "${R.appId}.uuid";
}
Expand All @@ -15,10 +12,6 @@ extension PrefsX on SharedPreferences {

Future<void> setLastVersion(String value) => setString(_K.lastVersion, value);

Size? getLastWindowSize() => _string2Size(getString(_K.lastWindowSize));

Future<void> setLastWindowSize(Size value) => setString(_K.lastWindowSize, _size2String(value));

/// The first time when user launch this app
DateTime? getInstallTime() {
final raw = getString(_K.installTime);
Expand All @@ -32,17 +25,3 @@ extension PrefsX on SharedPreferences {

Future<void> setUuid(String value) => setString(_K.uuid, value);
}

Size? _string2Size(String? value) {
if (value == null) return null;
final parts = value.split(",");
if (parts.length != 2) return null;
final width = int.tryParse(parts[0]);
final height = int.tryParse(parts[1]);
if (width == null || height == null) return null;
return Size(width.toDouble(), height.toDouble());
}

String _size2String(Size size) {
return "${size.width.toInt()},${size.height.toInt()}";
}
83 changes: 0 additions & 83 deletions lib/utils/ical.dart

This file was deleted.

1 change: 0 additions & 1 deletion linux/.gitignore

This file was deleted.

116 changes: 0 additions & 116 deletions linux/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 0a7c5e0

Please sign in to comment.