Skip to content

Commit

Permalink
fix a few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Sep 7, 2024
1 parent 99d7829 commit dd1c424
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ void main(List<String> args) async {

// Create the tray icon, required for the app to run in the background properly.
await trayManager.setIcon(
Platform.isWindows ? 'assets/icons/tray.ico' : 'assets/icons/tray.png',
Platform.isWindows
? 'assets/icons/tray.ico'
: '/usr/share/icons/hicolor/256x256/apps/dev.mrquantumoff.mcmodpackmanager.tray.png',
);
Menu menu = Menu(
items: [
Expand Down Expand Up @@ -669,7 +671,7 @@ class _QuadrantState extends State<Quadrant>
bool cond2 =
itemDate.add(const Duration(days: 14)).isAfter(DateTime.now());
bool cond3 = GetStorage().read("rssFeeds") == true;
bool cond4 = GetStorage().read("devMode") == true;
bool cond4 = false; // Used to be if DevMode is enabled
if (GetStorage().read("devMode")) {
debugPrint(
"\n\nName: ${item.title}\n\nDate: $itemTimestamp\n\nSeen: $cond1\nIs within last 2 weeks: $cond2\nAre RSS feeds enabled: $cond3\nIs DevMode Enabled: $cond4\n\n");
Expand Down
2 changes: 1 addition & 1 deletion lib/other/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ Future<void> checkAccountUpdates() async {
if (notification["read"] == false) {
Map notificationBody = json.decode(notification["message"]);
debugPrint("$notification");
List<String> shownNotifications =
List<dynamic> shownNotifications =
GetStorage().read("shownNotifications") ?? [];
if (!shownNotifications.contains(notification["notification_id"])) {
LocalNotification localNotification = LocalNotification(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ class _SyncedModpackState extends State<SyncedModpack> {
);
}
},
icon: localSyncDateMillis < widget.lastSynced
icon: (localSyncDateMillis < widget.lastSynced &&
localSyncDateMillis != 0)
? const Icon(Icons.update)
: const Icon(Icons.download),
label: localSyncDateMillis < widget.lastSynced
label: (localSyncDateMillis < widget.lastSynced &&
localSyncDateMillis != 0)
? Text(AppLocalizations.of(context)!.update)
: Text(
AppLocalizations.of(context)!.download),
Expand Down

0 comments on commit dd1c424

Please sign in to comment.