Skip to content

Commit

Permalink
Don't show activities imported toast multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
Inky-developer committed Dec 26, 2024
1 parent 89a9fbf commit bce1973
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/inky/fitnesscalendar/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ class MainActivity : ComponentActivity() {

requestNotificationPermission()

val toastMsg = intent.getStringExtra(EXTRA_TOAST)
if (toastMsg != null) {
Toast.makeText(this, toastMsg, Toast.LENGTH_LONG).show()
if (savedInstanceState == null) {
val toastMsg = intent.getStringExtra(EXTRA_TOAST)
if (toastMsg != null) {
Toast.makeText(this, toastMsg, Toast.LENGTH_LONG).show()
}
}

setContent {
Expand Down

0 comments on commit bce1973

Please sign in to comment.