File tree Expand file tree Collapse file tree
session/libsession/utilities
thoughtcrime/securesms/home Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ interface TextSecurePreferences {
153153 fun setHasSeenProExpiring ()
154154 fun hasSeenProExpired (): Boolean
155155 fun setHasSeenProExpired ()
156+ fun clearProExpiryView ()
156157 fun watchPostProStatus (): StateFlow <Boolean >
157158 fun setShownCallWarning (): Boolean
158159 fun setShownCallNotification (): Boolean
@@ -994,6 +995,11 @@ class AppTextSecurePreferences @Inject constructor(
994995 setBooleanPreference(HAS_SEEN_PRO_EXPIRED , true )
995996 }
996997
998+ override fun clearProExpiryView () {
999+ setBooleanPreference(HAS_SEEN_PRO_EXPIRED , false )
1000+ setBooleanPreference(HAS_SEEN_PRO_EXPIRING , false )
1001+ }
1002+
9971003 override fun watchPostProStatus (): StateFlow <Boolean > {
9981004 return postProLaunchState
9991005 }
Original file line number Diff line number Diff line change @@ -232,7 +232,10 @@ class HomeViewModel @Inject constructor(
232232 var showExpiring: Boolean = false
233233 var showExpired: Boolean = false
234234
235- if (subscription.type is ProStatus .Active .Expiring
235+ if (subscription.type is ProStatus .Active &&
236+ (prefs.hasSeenProExpiring() || prefs.hasSeenProExpired())){
237+ prefs.clearProExpiryView() // reset expiry view if the user is active again
238+ } else if (subscription.type is ProStatus .Active .Expiring
236239 && ! prefs.hasSeenProExpiring()
237240 ){
238241 val validUntil = subscription.type.renewingAt
You can’t perform that action at this time.
0 commit comments