Skip to content

Commit

Permalink
Fixed some issue and added autoupdate check
Browse files Browse the repository at this point in the history
  • Loading branch information
kekko7072 committed Mar 10, 2023
1 parent 44d2c0f commit 5c01051
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
appcast.xml,1678222400422,85a6d18cb3a843c07d52dec0b9a34845789f7cee79b7953d6bab95ca36698b32
0.0.6+7/lms-0.0.6+7-macos.zip,1678220005645,412cd22c5dca2507db5cc2f8a5a31bd0e2b163eaec37b3915b194641ddda02f2
0.0.6+7/lms-0.0.6+7-windows.exe,1678222053315,8b9619fcb702380da669c28f5f55dd8554c600586ba996bcc7877626041f91ae
0.0.7+7/lms-0.0.7+7-macos.zip,1678455657979,3d9b912ae0072e2f7983516fbf403a51aedbfe1596389d11ef8ac78f3ac2a45a
appcast.xml,1678456208835,15d562fb0fdf4da1a12426b40a252819d6e16ddfa32fb48b9d877b211d5f9d6b
Binary file removed dist/0.0.6+7/lms-0.0.6+7-macos.zip
Binary file not shown.
Binary file removed dist/0.0.6+7/lms-0.0.6+7-windows.exe
Binary file not shown.
3 changes: 0 additions & 3 deletions dist/appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<!--macOS_start-->
<item>
<title>Version 0.0.7</title>
<sparkle:releaseNotesLink>
https://your_domain/your_path/release_notes.html
</sparkle:releaseNotesLink>
<pubDate>Mon, 10 Mar 2023 14:00:00 +0800</pubDate>
<enclosure url="0.0.7+7/lms0.0.7+7-macos.zip"
sparkle:edSignature="ljDnTHJQdw6Oq+KkNGOS/hGxXcfIXBRXfVH8duDiKeKhQrUK6YqmHGGKEb05gpItTW2lSbZybAGQS0ZrNBFRCw=="
Expand Down
5 changes: 5 additions & 0 deletions lib/interfaces/about_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Future<void> showAboutApp(BuildContext context) async =>
const LicensesPageListTile(
icon: Icon(Icons.favorite),
),
ListTile(
leading: const Icon(Icons.update),
title: const Text('Check for update'),
onTap: () async => await autoUpdater.checkForUpdates(),
),
],
applicationIcon: const SizedBox(
width: 100,
Expand Down
18 changes: 11 additions & 7 deletions lib/services/database_local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ class DatabaseLocal {
if (await configured() && (await db?.getVersion())! == kDBVersion) {
debugPrint("Database already created");
} else if (await configured() && (await db?.getVersion())! < kDBVersion) {
//Command to update
await db?.execute('ALTER TABLE $kDBTable ADD COLUMN groupId INTEGER');
try {
//Command to update
await db?.execute('ALTER TABLE $kDBTable ADD COLUMN groupId INTEGER');

await dbGroupINIT();
await dbGroupINIT();

await dbGroupADD(const Group(
id: 0,
title: "First group",
description: "This is your first group"));
await dbGroupADD(const Group(
id: 0,
title: "First group",
description: "This is your first group"));
} catch (e) {
debugPrint("Error in update");
}

//Update version of DB
await db?.setVersion(kDBVersion);
Expand Down

0 comments on commit 5c01051

Please sign in to comment.