Commit a821fddb authored by Leonardo Aramaki's avatar Leonardo Aramaki

Remove logs

parent 6c62d59b
...@@ -93,12 +93,9 @@ object PushManager { ...@@ -93,12 +93,9 @@ object PushManager {
fun clearNotificationsByNotificationId(notificationId: Int) { fun clearNotificationsByNotificationId(notificationId: Int) {
if (hostToPushMessageList.isNotEmpty()) { if (hostToPushMessageList.isNotEmpty()) {
for (entry in hostToPushMessageList.entries) { for (entry in hostToPushMessageList.entries) {
println("state: ${entry.value.size} -> ${entry.value}")
println("Removing from ${entry.key}")
entry.value.removeAll { entry.value.removeAll {
it.notificationId.toInt() == notificationId it.notificationId.toInt() == notificationId
} }
println("state: ${entry.value.size} -> ${entry.value}")
} }
} }
} }
...@@ -356,7 +353,8 @@ object PushManager { ...@@ -356,7 +353,8 @@ object PushManager {
val inbox = Notification.InboxStyle() val inbox = Notification.InboxStyle()
val userMessages = pushMessageList.filter { val userMessages = pushMessageList.filter {
it.notificationId == lastPushMessage.notificationId } it.notificationId == lastPushMessage.notificationId
}
val count = pushMessageList.filter { val count = pushMessageList.filter {
it.title == title it.title == title
...@@ -476,14 +474,14 @@ object PushManager { ...@@ -476,14 +474,14 @@ object PushManager {
} }
private data class PushMessage( private data class PushMessage(
val title: String, val title: String,
val message: String, val message: String,
val image: String?, val image: String?,
val ejson: String, val ejson: String,
val count: String, val count: String,
val notificationId: String, val notificationId: String,
val summaryText: String, val summaryText: String,
val style: String) : Serializable { val style: String) : Serializable {
val host: String val host: String
val rid: String val rid: String
val type: String val type: String
...@@ -581,15 +579,8 @@ object PushManager { ...@@ -581,15 +579,8 @@ object PushManager {
return remoteInput?.getCharSequence(REMOTE_INPUT_REPLY) return remoteInput?.getCharSequence(REMOTE_INPUT_REPLY)
} }
private fun inspect(variable: String, value: CharSequence) {
println("$variable = ${value}")
}
// Just kept for reference. We should use this on rewrite with job schedulers // Just kept for reference. We should use this on rewrite with job schedulers
private fun sendMessage(hostname: String, message: CharSequence, roomId: String) { private fun sendMessage(hostname: String, message: CharSequence, roomId: String) {
inspect("hostname", hostname)
inspect("message", message)
inspect("roomId", roomId)
val roomRepository = RealmRoomRepository(hostname) val roomRepository = RealmRoomRepository(hostname)
val userRepository = RealmUserRepository(hostname) val userRepository = RealmUserRepository(hostname)
val messageRepository = RealmMessageRepository(hostname) val messageRepository = RealmMessageRepository(hostname)
...@@ -616,11 +607,11 @@ object PushManager { ...@@ -616,11 +607,11 @@ object PushManager {
.subscribeOn(AndroidSchedulers.from(BackgroundLooper.get())) .subscribeOn(AndroidSchedulers.from(BackgroundLooper.get()))
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ success -> .subscribe({ success ->
// Empty // Empty
}, { throwable -> }, { throwable ->
throwable.printStackTrace() throwable.printStackTrace()
Logger.report(throwable) Logger.report(throwable)
}) })
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment