Release 1.0.3: refine tablet layouts, pointer selection and account sync cleanup
Build iOS / build (push) Successful in 4m45s
Build App Bundle / build (push) Successful in 7m7s

This commit is contained in:
Ayushya Amitabh
2026-10-09 00:36:42 -04:00
parent 79085874a1
commit 0a4608e6c3
67 changed files with 1740 additions and 451 deletions
+35 -2
View File
@@ -171,6 +171,39 @@ class SessionController extends ChangeNotifier with WidgetsBindingObserver {
// Getters
String get serverUrl => _serverUrl;
String get username => _username;
String get displayName =>
_accounts
.where((a) => a.id == activeAccountId)
.map((a) => a.label)
.firstOrNull ??
_username;
Future<void> cacheDisplayName(String name, {required int generation}) async {
final clean = name.trim();
if (generation != _sessionGeneration || clean.isEmpty) return;
final id = activeAccountId;
if (id == null ||
!_accounts.any((a) => a.id == id && a.displayName != clean)) {
return;
}
final prefs = await prefsFuture;
if (generation != _sessionGeneration) return;
_accounts = [
for (final a in _accounts)
if (a.id == id)
SavedAccount(
id: a.id,
serverUrl: a.serverUrl,
username: a.username,
displayName: clean,
)
else
a,
];
await accountStore.saveAccounts(prefs, _accounts);
notifyListeners();
}
bool get isLoggedIn => _isLoggedIn;
bool get isLoading => _isLoading;
bool get isRestoringSession => _isRestoringSession;
@@ -560,6 +593,8 @@ class SessionController extends ChangeNotifier with WidgetsBindingObserver {
if (index == -1) return;
final wasActive = accountId == _activeAccountId;
await SyncService.removeAccountData(accountId);
_accounts = [..._accounts]..removeAt(index);
final prefs = await prefsFuture;
await accountStore.saveAccounts(prefs, _accounts);
@@ -568,8 +603,6 @@ class SessionController extends ChangeNotifier with WidgetsBindingObserver {
await prefs.remove(accountStore.accountPrefKey(accountId, key));
}
await accountStore.setSignedOut(prefs, accountId, false);
// Its background sync job holds that account's credentials - stop it.
unawaited(SyncService.cancelAccount(accountId));
if (!wasActive) {
notifyListeners();