diff --git a/lib/views/main_view.dart b/lib/views/main_view.dart index 2f0d9e6..a917f85 100644 --- a/lib/views/main_view.dart +++ b/lib/views/main_view.dart @@ -312,13 +312,13 @@ class _MainState extends State with TickerProviderStateMixin { onRefresh: () { return Future(() => changePlayer(snapshot.data![0].userId)); }, - // notificationPredicate: (notification) { - // // with NestedScrollView local(depth == 2) OverscrollNotification are not sent - // if (!kIsWeb && (notification is OverscrollNotification || Platform.isIOS)) { - // return notification.depth == 2; - // } - // return notification.depth == 0; - // }, + notificationPredicate: (notification) { + // with NestedScrollView local(depth == 2) OverscrollNotification are not sent + if (!kIsWeb && (notification is OverscrollNotification || Platform.isIOS)) { + return notification.depth == 2; + } + return notification.depth == 0; + }, child: NestedScrollView( controller: _scrollController, physics: const AlwaysScrollableScrollPhysics(), @@ -350,7 +350,7 @@ class _MainState extends State with TickerProviderStateMixin { body: TabBarView( controller: _tabController, children: [ - TLThingy(tl: snapshot.data![0].tlSeason1, userID: snapshot.data![0].userId, states: snapshot.data![2], topTR: snapshot.data![7], bot: snapshot.data![0].role == "bot"), + TLThingy(tl: snapshot.data![0].tlSeason1, userID: snapshot.data![0].userId, states: snapshot.data![2], topTR: snapshot.data![7], bot: snapshot.data![0].role == "bot", guest: snapshot.data![0].role == "anon"), _TLRecords(userID: snapshot.data![0].userId, data: snapshot.data![3]), _History(states: snapshot.data![2], update: _justUpdate), _RecordThingy(record: (snapshot.data![1]['sprint'].isNotEmpty) ? snapshot.data![1]['sprint'][0] : null), diff --git a/lib/widgets/tl_thingy.dart b/lib/widgets/tl_thingy.dart index 3d3a3c9..d5b7573 100644 --- a/lib/widgets/tl_thingy.dart +++ b/lib/widgets/tl_thingy.dart @@ -21,8 +21,9 @@ class TLThingy extends StatefulWidget { final List states; final bool showTitle; final bool bot; + final bool guest; final double? topTR; - const TLThingy({super.key, required this.tl, required this.userID, required this.states, this.showTitle = true, this.bot=false, this.topTR}); + const TLThingy({super.key, required this.tl, required this.userID, required this.states, this.showTitle = true, this.bot=false, this.guest=false, this.topTR}); @override State createState() => _TLThingyState(); @@ -409,7 +410,7 @@ class _TLThingyState extends State { if (currentTl.nerdStats != null) Graphs(currentTl.apm!, currentTl.pps!, currentTl.vs!, currentTl.nerdStats!, currentTl.playstyle!) ] : [ - Text(widget.bot ? t.botTL : t.neverPlayedTL, style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28)), + Center(child: Text(widget.guest ? t.anonTL : widget.bot ? t.botTL : t.neverPlayedTL, style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28), textAlign: TextAlign.center,)), ], ); },