feat: add equality operators, make history screen paginated, random performance updates

This commit is contained in:
2026-07-29 18:10:46 +02:00
parent da5588cd1c
commit 031a618220
22 changed files with 702 additions and 79 deletions
+1
View File
@@ -0,0 +1 @@
const kUpdateServerUrl = 'https://updater.brammie15.dev';
+15
View File
@@ -36,6 +36,21 @@ class UpdateInfo {
download: json["download"] ?? "",
);
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is UpdateInfo &&
update == other.update &&
version == other.version &&
notes == other.notes &&
mandatory == other.mandatory &&
sha256 == other.sha256 &&
download == other.download;
@override
int get hashCode =>
Object.hash(update, version, notes, mandatory, sha256, download);
}
class AppUpdateUtil {
+4 -2
View File
@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:kooltab2/utils/app_update_util.dart';
import 'package:ota_update/ota_update.dart';
import 'app_config.dart';
class UpdateChecker {
static bool _hasChecked = false;
@@ -13,7 +15,7 @@ class UpdateChecker {
_hasChecked = true;
final updater = AppUpdateUtil(serverUrl: "https://updater.brammie15.dev");
final updater = AppUpdateUtil(serverUrl: kUpdateServerUrl);
try {
final update = await updater.checkForUpdate();
@@ -72,7 +74,7 @@ Future<void> _downloadAndInstall(UpdateInfo update) async {
try {
final url = update.download.startsWith("http")
? update.download
: "https://updater.brammie15.dev${update.download}";
: "$kUpdateServerUrl${update.download}";
OtaUpdate()
.execute(
url,