comment unused, overridden methods and respect 120 character line length

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-26 22:07:23 +02:00
parent e7ea57bf85
commit cfe00937c5
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
2 changed files with 40 additions and 12 deletions

View File

@ -1105,6 +1105,7 @@ class ChatController(args: Bundle) :
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<GenericOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(genericOverall: GenericOverall) {
@ -1133,6 +1134,7 @@ class ChatController(args: Bundle) :
}
override fun onComplete() {
// unused atm
}
})
}
@ -1227,9 +1229,11 @@ class ChatController(args: Bundle) :
}
override fun onError(e: Throwable) {
// unused atm
}
override fun onComplete() {
// unused atm
}
})
} else {
@ -1254,9 +1258,11 @@ class ChatController(args: Bundle) :
}
override fun onError(e: Throwable) {
// unused atm
}
override fun onComplete() {
// unused atm
}
})
}
@ -1662,7 +1668,9 @@ class ChatController(args: Bundle) :
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(object : Observer<RoomOverall> {
override fun onSubscribe(d: Disposable) {}
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(roomOverall: RoomOverall) {
bundle.putParcelable(
KEY_ACTIVE_CONVERSATION,
@ -1678,7 +1686,9 @@ class ChatController(args: Bundle) :
Log.e(TAG, e.message, e)
}
override fun onComplete() {}
override fun onComplete() {
// unused atm
}
})
}
@ -1686,7 +1696,9 @@ class ChatController(args: Bundle) :
Log.e(TAG, e.message, e)
}
override fun onComplete() {}
override fun onComplete() {
// unused atm
}
})
true
}
@ -1709,6 +1721,7 @@ class ChatController(args: Bundle) :
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<ChatOverallSingleMessage> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(t: ChatOverallSingleMessage) {
@ -1731,6 +1744,7 @@ class ChatController(args: Bundle) :
}
override fun onComplete() {
// unused atm
}
})
true
@ -1849,6 +1863,7 @@ class ChatController(args: Bundle) :
?.observeOn(AndroidSchedulers.mainThread())
?.subscribe(object : Observer<RoomOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}
override fun onNext(roomOverall: RoomOverall) {
@ -1884,9 +1899,12 @@ class ChatController(args: Bundle) :
}
override fun onError(e: Throwable) {
// unused atm
}
override fun onComplete() {}
override fun onComplete() {
// unused atm
}
})
}
}

View File

@ -217,10 +217,11 @@ class ConversationInfoController(args: Bundle) :
}
}
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat).setOnCheckedChangeListener { _, _ ->
reconfigureLobbyTimerView()
submitLobbyChanges()
}
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
.setOnCheckedChangeListener { _, _ ->
reconfigureLobbyTimerView()
submitLobbyChanges()
}
} else {
binding.webinarInfoView.webinarSettings.visibility = View.GONE
}
@ -228,7 +229,8 @@ class ConversationInfoController(args: Bundle) :
fun reconfigureLobbyTimerView(dateTime: Calendar? = null) {
val isChecked =
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat).isChecked
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
.isChecked
if (dateTime != null && isChecked) {
conversation!!.lobbyTimer = (dateTime.timeInMillis - (dateTime.time.seconds * 1000)) / 1000
@ -239,7 +241,11 @@ class ConversationInfoController(args: Bundle) :
conversation!!.lobbyState = if (isChecked) Conversation.LobbyState
.LOBBY_STATE_MODERATORS_ONLY else Conversation.LobbyState.LOBBY_STATE_ALL_PARTICIPANTS
if (conversation!!.lobbyTimer != null && conversation!!.lobbyTimer != java.lang.Long.MIN_VALUE && conversation!!.lobbyTimer != 0L) {
if (
conversation!!.lobbyTimer != null &&
conversation!!.lobbyTimer != java.lang.Long.MIN_VALUE &&
conversation!!.lobbyTimer != 0L
) {
binding.webinarInfoView.startTimePreferences.setSummary(
DateUtils.getLocalDateStringFromTimestampForLobby(
conversation!!.lobbyTimer
@ -258,7 +264,8 @@ class ConversationInfoController(args: Bundle) :
fun submitLobbyChanges() {
val state = if (
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat).isChecked
(binding.webinarInfoView.conversationInfoLobby.findViewById<View>(R.id.mp_checkable) as SwitchCompat)
.isChecked
) 1 else 0
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.APIv4, 1))
@ -566,7 +573,10 @@ class ConversationInfoController(args: Bundle) :
private fun adjustNotificationLevelUI() {
if (conversation != null) {
if (conversationUser != null && CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "notification-levels")) {
if (
conversationUser != null &&
CapabilitiesUtil.hasSpreedFeatureCapability(conversationUser, "notification-levels")
) {
binding.notificationSettingsView.conversationInfoMessageNotifications.isEnabled = true
binding.notificationSettingsView.conversationInfoMessageNotifications.alpha = 1.0f