larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
523 stars 258 forks source link

Alert never again shows if user does not interact with it #379

Closed Enri-code closed 4 months ago

Enri-code commented 5 months ago

When the Upgrader Alert dialog is displayed, if I don't interact with the buttons but I restart the app (by reopening or hot-restarting). The dialog is not shown again.

I/flutter (27590): upgrader: instantiated.
I/flutter (27590): upgrader: initialize called
I/flutter (27590): upgrader: build UpgradeAlert
I/flutter (27590): upgrader: initializing
I/flutter (27590): upgrader: default operatingSystem: android sdk_gphone_arm64-userdebug 11 RSR1.210722.002 7602718 dev-keys
I/flutter (27590): upgrader: operatingSystem: android
I/flutter (27590): upgrader: isAndroid: true, isIOS: false, isLinux: false, isMacOS: false, isWindows: false, isFuchsia: false, isWeb: false
I/flutter (27590): upgrader: package info packageName: com.kurero.kurero
I/flutter (27590): upgrader: package info appName: Kurero
I/flutter (27590): upgrader: package info version: 1.0.2
I/flutter (27590): upgrader: appcast is available for this platform
I/flutter (27590): upgrader: appcast item count: 1
I/flutter (27590): upgrader: appcast best item version: 1.0.3
I/flutter (27590): upgrader: appcast critical update item version: null
I/flutter (27590): upgrader: need to evaluate version
I/flutter (27590): upgrader: blocked: false
I/flutter (27590): upgrader: debugDisplayAlways: false
I/flutter (27590): upgrader: debugDisplayOnce: false
I/flutter (27590): upgrader: hasAlerted: false
I/flutter (27590): upgrader: appStoreVersion: 1.0.3
I/flutter (27590): upgrader: installedVersion: 1.0.2
I/flutter (27590): upgrader: minAppVersion: null
I/flutter (27590): upgrader: isUpdateAvailable: true
I/flutter (27590): upgrader: isTooSoon: true
I/flutter (27590): upgrader: shouldDisplayUpgrade: false
I/flutter (27590): upgrader: shouldDisplayReleaseNotes: true
  upgrader:
    dependency: "direct main"
    description:
      name: upgrader
      url: "https://pub.dev"
    source: hosted
    version: "8.4.0"
VanToan08 commented 5 months ago

I had the same problem as yours and now I'm having to use upgrader: ^7.1.0

larryaasen commented 4 months ago

@Enri-code According to your log, isTooSoon: true, which means that you need to wait 3 days (default) before it will show again.