chore: fix off-center close button in level up notifications (#2382)

This commit is contained in:
ggurdin 2025-04-07 14:18:48 -04:00 committed by GitHub
parent b6a6991e61
commit 871c7a20e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 12 deletions

View file

@ -485,17 +485,6 @@ class ChatListController extends State<ChatList>
@override
void initState() {
// #Pangea
WidgetsBinding.instance.addPostFrameCallback((_) {
final params = GoRouterState.of(context).uri.queryParameters;
if (!params.containsKey("filter") || params['filter'] != 'groups') return;
setActiveFilter(
AppConfig.separateChatTypes
? ActiveFilter.groups
: ActiveFilter.allChats,
);
});
// Pangea#
_initReceiveSharingIntent();
scrollController.addListener(_onScroll);
@ -654,6 +643,22 @@ class ChatListController extends State<ChatList>
super.initState();
}
// #Pangea
@override
void didUpdateWidget(ChatList oldWidget) {
super.didUpdateWidget(oldWidget);
WidgetsBinding.instance.addPostFrameCallback((_) {
final params = GoRouterState.of(context).uri.queryParameters;
if (!params.containsKey("filter") || params['filter'] != 'groups') return;
setActiveFilter(
AppConfig.separateChatTypes
? ActiveFilter.groups
: ActiveFilter.allChats,
);
});
}
// Pangea#
@override
void dispose() {
_intentDataStreamSubscription?.cancel();

View file

@ -130,7 +130,9 @@ class LevelUpAnimationState extends State<LevelUpAnimation> {
onPressed: () => Navigator.of(context).pop(),
child: Text(L10n.of(context).close),
),
const SizedBox(width: 16),
if (widget.summaryStateEventId != null &&
widget.analyticsRoomId != null)
const SizedBox(width: 16),
if (widget.summaryStateEventId != null &&
widget.analyticsRoomId != null)
// Show summary button