Message notifications working

This commit is contained in:
stopflock
2025-12-02 14:04:04 -06:00
parent bc03dcbe89
commit c4d9cd7986
15 changed files with 230 additions and 16 deletions
+6 -2
View File
@@ -673,7 +673,11 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
// Check for welcome/changelog popup after app is fully initialized
if (appState.isInitialized && !_hasCheckedForPopup) {
_hasCheckedForPopup = true;
WidgetsBinding.instance.addPostFrameCallback((_) => _checkForPopup());
WidgetsBinding.instance.addPostFrameCallback((_) {
_checkForPopup();
// Check if re-authentication is needed for message notifications
appState.checkAndPromptReauthForMessages(context);
});
}
// Pass the active sheet height directly to the map
@@ -720,7 +724,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
icon: Stack(
children: [
const Icon(Icons.settings),
if (appState.hasUnreadMessages && appState.uploadMode != UploadMode.simulate)
if (appState.hasUnreadMessages)
Positioned(
right: 0,
top: 0,
+2 -2
View File
@@ -239,8 +239,8 @@ class _OSMAccountScreenState extends State<OSMAccountScreen> {
),
),
// Account deletion section - only show when logged in
if (appState.isLoggedIn) ...[
// Account deletion section - only show when logged in and not in simulate mode
if (appState.isLoggedIn && appState.uploadMode != UploadMode.simulate) ...[
const SizedBox(height: 16),
_buildAccountDeletionSection(context, appState),
],
@@ -38,7 +38,13 @@ class UploadModeSection extends StatelessWidget {
),
],
onChanged: (mode) {
if (mode != null) appState.setUploadMode(mode);
if (mode != null) {
appState.setUploadMode(mode);
// Check if re-authentication is needed after mode change
WidgetsBinding.instance.addPostFrameCallback((_) {
appState.checkAndPromptReauthForMessages(context);
});
}
},
),
),
+1 -1
View File
@@ -120,7 +120,7 @@ class SettingsScreen extends StatelessWidget {
leading: Stack(
children: [
const Icon(Icons.account_circle),
if (appState.hasUnreadMessages && appState.uploadMode != UploadMode.simulate)
if (appState.hasUnreadMessages)
Positioned(
right: 0,
top: 0,