Merge pull request #1921 from Hafizzle/Fiz/push-notif-crash-fix

Check for IOException (No google services)
This commit is contained in:
Phillip Thelen 2023-02-02 12:49:42 +01:00 committed by GitHub
commit 46752a1550
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,7 @@ import com.habitrpg.android.habitica.helpers.AmplitudeManager
import com.habitrpg.android.habitica.helpers.launchCatching
import com.habitrpg.android.habitica.models.user.User
import kotlinx.coroutines.MainScope
import java.io.IOException
class PushNotificationManager(
var apiClient: ApiClient,
@ -56,8 +57,10 @@ class PushNotificationManager(
try {
refreshedToken = it.result
addRefreshToken()
} catch (_: Exception) {
// catchy catch
} catch (_: IOException) {
// catchy catch-catch
} catch (_: Exception){
// catchy catch-catch-cat, I'm out of breath.
}
}
} catch (_: Exception) {