Skip to content

Commit

Permalink
Remove user name from app title
Browse files Browse the repository at this point in the history
Closes #365
  • Loading branch information
veloce committed Nov 17, 2023
1 parent ccd8924 commit 1dab6a6
Showing 1 changed file with 5 additions and 36 deletions.
41 changes: 5 additions & 36 deletions lib/src/view/home/home_tab_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import 'package:lichess_mobile/src/widgets/board_preview.dart';
import 'package:lichess_mobile/src/widgets/feedback.dart';
import 'package:lichess_mobile/src/widgets/platform.dart';
import 'package:lichess_mobile/src/widgets/buttons.dart';
import 'package:lichess_mobile/src/widgets/player.dart';
import 'package:lichess_mobile/src/widgets/shimmer.dart';
import 'package:lichess_mobile/src/model/account/account_repository.dart';
import 'package:lichess_mobile/src/model/common/speed.dart';
Expand Down Expand Up @@ -110,24 +109,9 @@ class _HomeScreenState extends ConsumerState<HomeTabScreen> with RouteAware {
}

Widget _androidBuilder(BuildContext context) {
final accountUserAsync = ref.watch(accountUserProvider);
return Scaffold(
appBar: AppBar(
title: accountUserAsync.when(
data: (user) {
if (user != null) {
return PlayerTitle(
userName: user.name,
title: user.title,
isPatron: user.isPatron,
);
} else {
return const _LichessTitle();
}
},
loading: () => const SizedBox.shrink(),
error: (error, stack) => const _LichessTitle(),
),
title: const _LichessTitle(),
actions: const [
SignInWidget(),
_SettingsButton(),
Expand All @@ -144,30 +128,15 @@ class _HomeScreenState extends ConsumerState<HomeTabScreen> with RouteAware {
}

Widget _iosBuilder(BuildContext context) {
final accountUserAsync = ref.watch(accountUserProvider);
return CupertinoPageScaffold(
child: _HomeScaffold(
child: CustomScrollView(
controller: homeScrollController,
slivers: [
CupertinoSliverNavigationBar(
largeTitle: accountUserAsync.when(
data: (user) {
if (user != null) {
return PlayerTitle(
userName: user.name,
title: user.title,
isPatron: user.isPatron,
);
} else {
return const _LichessTitle();
}
},
loading: () => const SizedBox.shrink(),
error: (error, stack) => const _LichessTitle(),
),
leading: const SignInWidget(),
trailing: const _SettingsButton(),
const CupertinoSliverNavigationBar(
largeTitle: _LichessTitle(),
leading: SignInWidget(),
trailing: _SettingsButton(),
),
CupertinoSliverRefreshControl(
onRefresh: () => _refreshData(),
Expand Down

0 comments on commit 1dab6a6

Please sign in to comment.