forked from upstream-mirrors/quik
Move lambdas outside of parentheses
This commit is contained in:
+2
-2
@@ -129,7 +129,7 @@ class ConversationInfoActivity : QkThemedActivity(), ConversationInfoView {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle(R.string.info_name)
|
||||
.setView(editText)
|
||||
.setPositiveButton(R.string.button_save, { _, _ -> nameChangedIntent.onNext(editText.text.toString()) })
|
||||
.setPositiveButton(R.string.button_save) { _, _ -> nameChangedIntent.onNext(editText.text.toString()) }
|
||||
.setNegativeButton(R.string.button_cancel, null)
|
||||
.show()
|
||||
}
|
||||
@@ -138,7 +138,7 @@ class ConversationInfoActivity : QkThemedActivity(), ConversationInfoView {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle(R.string.dialog_delete_title)
|
||||
.setMessage(R.string.dialog_delete_message)
|
||||
.setPositiveButton(R.string.button_delete, { _, _ -> confirmDeleteIntent.onNext(Unit) })
|
||||
.setPositiveButton(R.string.button_delete) { _, _ -> confirmDeleteIntent.onNext(Unit) }
|
||||
.setNegativeButton(R.string.button_cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
+5
-5
@@ -118,19 +118,19 @@ class ConversationInfoViewModel @Inject constructor(
|
||||
|
||||
// Show the notifications settings for the conversation
|
||||
view.notificationsIntent
|
||||
.withLatestFrom(conversation, { _, conversation -> conversation })
|
||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { conversation -> navigator.showNotificationSettings(conversation.id) }
|
||||
|
||||
// Show the theme settings for the conversation
|
||||
view.themeIntent
|
||||
.withLatestFrom(conversation, { _, conversation -> conversation })
|
||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { conversation -> navigator.showThemePicker(conversation.id) }
|
||||
|
||||
// Toggle the archived state of the conversation
|
||||
view.archiveIntent
|
||||
.withLatestFrom(conversation, { _, conversation -> conversation })
|
||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { conversation ->
|
||||
when (conversation.archived) {
|
||||
@@ -141,7 +141,7 @@ class ConversationInfoViewModel @Inject constructor(
|
||||
|
||||
// Toggle the blocked state of the conversation
|
||||
view.blockIntent
|
||||
.withLatestFrom(conversation, { _, conversation -> conversation })
|
||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { conversation ->
|
||||
when (conversation.blocked) {
|
||||
@@ -157,7 +157,7 @@ class ConversationInfoViewModel @Inject constructor(
|
||||
|
||||
// Delete the conversation
|
||||
view.confirmDeleteIntent
|
||||
.withLatestFrom(conversation, { _, conversation -> conversation })
|
||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { conversation -> deleteConversations.execute(listOf(conversation.id)) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user