mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Rename fun in Callback for clarity.
This commit is contained in:
committed by
Benoit Marty
parent
353c00e032
commit
43972dba68
+7
-7
@@ -116,27 +116,27 @@ class HomeFlowNode(
|
||||
}
|
||||
|
||||
private fun onRoomClick(roomId: RoomId) {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onRoomClick(roomId) }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToRoom(roomId) }
|
||||
}
|
||||
|
||||
private fun onOpenSettings() {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onSettingsClick() }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToSettings() }
|
||||
}
|
||||
|
||||
private fun onStartChatClick() {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onStartChatClick() }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToCreateRoom() }
|
||||
}
|
||||
|
||||
private fun onSetUpRecoveryClick() {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onSetUpRecoveryClick() }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToSetUpRecovery() }
|
||||
}
|
||||
|
||||
private fun onSessionConfirmRecoveryKeyClick() {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onSessionConfirmRecoveryKeyClick() }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToEnterRecoveryKey() }
|
||||
}
|
||||
|
||||
private fun onRoomSettingsClick(roomId: RoomId) {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onRoomSettingsClick(roomId) }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToRoomSettings(roomId) }
|
||||
}
|
||||
|
||||
private fun onReportRoomClick(roomId: RoomId) {
|
||||
@@ -153,7 +153,7 @@ class HomeFlowNode(
|
||||
inviteFriendsUseCase.execute(activity)
|
||||
}
|
||||
RoomListMenuAction.ReportBug -> {
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.onReportBugClick() }
|
||||
plugins<HomeEntryPoint.Callback>().forEach { it.navigateToBugReport() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -41,13 +41,13 @@ class DefaultHomeEntryPointTest {
|
||||
)
|
||||
}
|
||||
val callback = object : HomeEntryPoint.Callback {
|
||||
override fun onRoomClick(roomId: RoomId) = lambdaError()
|
||||
override fun onStartChatClick() = lambdaError()
|
||||
override fun onSettingsClick() = lambdaError()
|
||||
override fun onSetUpRecoveryClick() = lambdaError()
|
||||
override fun onSessionConfirmRecoveryKeyClick() = lambdaError()
|
||||
override fun onRoomSettingsClick(roomId: RoomId) = lambdaError()
|
||||
override fun onReportBugClick() = lambdaError()
|
||||
override fun navigateToRoom(roomId: RoomId) = lambdaError()
|
||||
override fun navigateToCreateRoom() = lambdaError()
|
||||
override fun navigateToSettings() = lambdaError()
|
||||
override fun navigateToSetUpRecovery() = lambdaError()
|
||||
override fun navigateToEnterRecoveryKey() = lambdaError()
|
||||
override fun navigateToRoomSettings(roomId: RoomId) = lambdaError()
|
||||
override fun navigateToBugReport() = lambdaError()
|
||||
}
|
||||
val result = entryPoint.nodeBuilder(parentNode, BuildContext.root(null))
|
||||
.callback(callback)
|
||||
|
||||
Reference in New Issue
Block a user