mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
Use .orEmpty()
instead of ?: ""
This commit is contained in:
parent
5e10449746
commit
f1e57d2970
3 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class PushersManager @Inject constructor(
|
|||
currentSession.pushersService().testPush(
|
||||
unifiedPushHelper.getPushGateway()!!,
|
||||
stringProvider.getString(R.string.pusher_app_id),
|
||||
unifiedPushHelper.getEndpointOrToken() ?: "",
|
||||
unifiedPushHelper.getEndpointOrToken().orEmpty(),
|
||||
TEST_EVENT_ID
|
||||
)
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ class UnifiedPushHelper @Inject constructor(
|
|||
vectorPreferences?.setFdroidSyncBackgroundMode(mode)
|
||||
runBlocking {
|
||||
try {
|
||||
pushersManager?.unregisterPusher(getEndpointOrToken() ?: "")
|
||||
pushersManager?.unregisterPusher(getEndpointOrToken().orEmpty())
|
||||
} catch (e: Exception) {
|
||||
Timber.d("Probably unregistering a non existant pusher")
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ class VectorMessagingReceiver : MessagingReceiver() {
|
|||
guardServiceStarter.start()
|
||||
runBlocking {
|
||||
try {
|
||||
pushersManager.unregisterPusher(unifiedPushHelper.getEndpointOrToken() ?: "")
|
||||
pushersManager.unregisterPusher(unifiedPushHelper.getEndpointOrToken().orEmpty())
|
||||
} catch (e: Exception) {
|
||||
Timber.tag(loggerTag.value).d("Probably unregistering a non existant pusher")
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue