File tree 2 files changed +7
-1
lines changed
app/src/main/java/com/protonvpn/android
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ class ApiNotificationManager @Inject constructor(
175
175
periodicUpdateManager.unregister(notificationsUpdate)
176
176
}
177
177
178
- private suspend fun forceUpdate () {
178
+ suspend fun forceUpdate () {
179
179
periodicUpdateManager.executeNow(notificationsUpdate)
180
180
}
181
181
Original file line number Diff line number Diff line change 20
20
package com.protonvpn.android.ui.deeplinks
21
21
22
22
import android.net.Uri
23
+ import com.protonvpn.android.appconfig.ApiNotificationManager
23
24
import com.protonvpn.android.utils.UserPlanManager
24
25
import dagger.Reusable
25
26
import kotlinx.coroutines.CoroutineScope
@@ -33,6 +34,7 @@ private const val PROTONVPN_SCHEME = "protonvpn"
33
34
class DeepLinkHandler @Inject constructor(
34
35
private val mainScope : CoroutineScope ,
35
36
private val userPlanManager : UserPlanManager ,
37
+ private val notificationManager : ApiNotificationManager ,
36
38
) {
37
39
fun processDeepLink (uri : Uri ) {
38
40
if (uri.scheme?.equalsNoCase(PROTONVPN_SCHEME ) == true ) {
@@ -46,6 +48,10 @@ class DeepLinkHandler @Inject constructor(
46
48
private fun refreshVpnInfo () {
47
49
mainScope.launch {
48
50
userPlanManager.refreshVpnInfo()
51
+ // Force notifications update even if there is no plan change - the user could be updating between 1m and
52
+ // 12m subscriptions.
53
+ // This is a temporary solution, we should detect such changes.
54
+ notificationManager.forceUpdate()
49
55
}
50
56
}
51
57
}
You can’t perform that action at this time.
0 commit comments