[client] reflect folder name in window title

This commit is contained in:
Abhishek Shroff
2024-11-03 08:47:46 +05:30
parent c8b1d6d4b8
commit b04dff6e5b
3 changed files with 6 additions and 12 deletions
+1 -11
View File
@@ -80,7 +80,7 @@ class PhylumApp extends StatelessWidget {
}
return MaterialApp.router(
key: ValueKey('${account.id}-notready'),
title: 'Phylum',
title: 'Logging Out | Phylum',
debugShowCheckedModeBanner: false,
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange)),
darkTheme: ThemeData.dark(),
@@ -93,14 +93,4 @@ class PhylumApp extends StatelessWidget {
errorBuilder: (context, state) => const AppLogout(),
routes: [],
);
MaterialApp createRouter(RouterConfig<Object> router) => MaterialApp.router(
key: ValueKey(account),
title: 'Phylum',
debugShowCheckedModeBanner: false,
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange)),
darkTheme: ThemeData.dark(),
routerConfig: router,
shortcuts: getAppShortcuts(),
);
}
+1 -1
View File
@@ -81,7 +81,7 @@ class AccountSelector extends StatelessWidget {
Widget buildLoginPage(BuildContext context) => MaterialApp(
key: _loginAppKey,
title: 'Phylum',
title: 'Login | Phylum',
debugShowCheckedModeBanner: false,
theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange)),
darkTheme: ThemeData.dark(),
+4
View File
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_router/go_router.dart';
import 'package:phylum/libphylum/db/db.dart';
import 'package:phylum/libphylum/phylum_account.dart';
@@ -44,6 +45,9 @@ class _PathViewState extends State<PathView> {
void updateStream() {
sub?.cancel();
sub = context.read<PhylumAccount>().db.parents(id).watch().listen((data) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
label: "${data[0].name == "" ? "/" : data[0].name} | Phylum",
));
setState(() {
ancestors = data.reversed;
});