Remove unused methods / clarify API
This commit is contained in:
parent
35e0a0af33
commit
80d42f0963
|
@ -47,8 +47,7 @@ class PushersManager @Inject constructor(
|
|||
}
|
||||
|
||||
fun enqueueRegisterPusherWithFcmKey(pushKey: String): UUID {
|
||||
val currentSession = activeSessionHolder.getActiveSession()
|
||||
return currentSession.pushersService().enqueueAddHttpPusher(createHttpPusher(pushKey))
|
||||
return enqueueRegisterPusher(pushKey, stringProvider.getString(R.string.pusher_http_url))
|
||||
}
|
||||
|
||||
fun enqueueRegisterPusher(
|
||||
|
@ -56,25 +55,13 @@ class PushersManager @Inject constructor(
|
|||
gateway: String
|
||||
): UUID {
|
||||
val currentSession = activeSessionHolder.getActiveSession()
|
||||
return currentSession.pushersService().enqueueAddHttpPusher(createHttpPusher(pushKey, gateway))
|
||||
}
|
||||
|
||||
suspend fun registerPusherWithFcmKey(pushKey: String) {
|
||||
val currentSession = activeSessionHolder.getActiveSession()
|
||||
currentSession.pushersService().addHttpPusher(createHttpPusher(pushKey))
|
||||
}
|
||||
|
||||
suspend fun registerPusher(
|
||||
pushKey: String,
|
||||
gateway: String
|
||||
) {
|
||||
val currentSession = activeSessionHolder.getActiveSession()
|
||||
currentSession.pushersService().addHttpPusher(createHttpPusher(pushKey, gateway))
|
||||
val pusher = createHttpPusher(pushKey, gateway)
|
||||
return currentSession.pushersService().enqueueAddHttpPusher(pusher)
|
||||
}
|
||||
|
||||
private fun createHttpPusher(
|
||||
pushKey: String,
|
||||
gateway: String = stringProvider.getString(R.string.pusher_http_url)
|
||||
gateway: String
|
||||
) = HttpPusher(
|
||||
pushKey,
|
||||
stringProvider.getString(R.string.pusher_app_id),
|
||||
|
|
Loading…
Reference in New Issue