Skip to content

Commit

Permalink
fix rss and tray icons on linux (backport)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Jul 17, 2024
1 parent a17e50d commit 8239b20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void main(List<String> args) async {
// For macOS platform needs to declare the scheme in ios/Runner/Info.plist

await trayManager.setIcon(
Platform.isWindows ? 'assets/icons/tray.ico' : 'icons/tray.png',
Platform.isWindows ? 'assets/icons/tray.ico' : 'assets/icons/tray.png',
);
Menu menu = Menu(
items: [
Expand Down Expand Up @@ -687,6 +687,7 @@ class _QuadrantState extends State<Quadrant>
try {
http.Response res =
await http.get(Uri.parse("https://api.mrquantumoff.dev/blog.rss"));

if (res.statusCode != 200) return;
String rawFeed = res.body;

Expand All @@ -704,7 +705,7 @@ class _QuadrantState extends State<Quadrant>
areAnyNews = false;
String itemTimestamp = item.pubDate!;
debugPrint("itemTimestamp");
var format = DateFormat("E, dd MMM y H:m:s +0000");
var format = DateFormat("E, dd MMM y H:m:s");
DateTime itemDate = format.parse(itemTimestamp);
bool cond2 =
itemDate.add(const Duration(days: 14)).isAfter(DateTime.now());
Expand All @@ -715,7 +716,8 @@ class _QuadrantState extends State<Quadrant>

if (((cond1 && cond2) || cond4) &&
cond3 &&
categories.contains("Minecraft Modpack Manager")) {
(categories.contains("Quadrant") ||
categories.contains("Minecraft Modpack Manager"))) {
var newSeenItems =
(GetStorage().read<List<dynamic>>("seenItems") ?? []);
newSeenItems.add(item.guid!);
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: quadrant
description: Manage your modpacks and mods with ease.
publish_to: 'none'

version: 24.7.3+0
version: 24.7.4+0

environment:
sdk: '>=3.0.0 <4.0.0'
Expand Down Expand Up @@ -82,7 +82,7 @@ msix_config:
publisher_display_name: MrQuantumOFF (Demir Yerli)
publisher: CN=010914FC-8843-4963-A3FE-E3E06E6D9F53
identity_name: 58734MrQuantumOFFDemirYer.MinecraftModpackManagerR
msix_version: 24.7.3.0
msix_version: 24.7.4.0
logo_path: .\assets\icons\logo.ico
startup_task: # <-- Startup Task
enabled: true # optional (default: true)
Expand Down

0 comments on commit 8239b20

Please sign in to comment.