Adding listener on the new menu item
This commit is contained in:
parent
62e2f06e2a
commit
2b8dc13dca
@ -99,6 +99,7 @@ class VectorSettingsDevicesFragment :
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
initWaitingView()
|
||||
initCurrentSessionHeaderView()
|
||||
initOtherSessionsHeaderView()
|
||||
initOtherSessionsView()
|
||||
initSecurityRecommendationsView()
|
||||
@ -139,6 +140,18 @@ class VectorSettingsDevicesFragment :
|
||||
views.waitingView.waitingStatusText.isVisible = true
|
||||
}
|
||||
|
||||
private fun initCurrentSessionHeaderView() {
|
||||
views.deviceListHeaderCurrentSession.setOnMenuItemClickListener { menuItem ->
|
||||
when (menuItem.itemId) {
|
||||
R.id.currentSessionHeaderSignoutOtherSessions -> {
|
||||
confirmMultiSignoutOtherSessions()
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initOtherSessionsHeaderView() {
|
||||
views.deviceListHeaderOtherSessions.setOnMenuItemClickListener { menuItem ->
|
||||
when (menuItem.itemId) {
|
||||
@ -327,7 +340,7 @@ class VectorSettingsDevicesFragment :
|
||||
} else {
|
||||
stringProvider.getString(R.string.device_manager_other_sessions_show_ip_address)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideOtherSessionsView() {
|
||||
|
Loading…
Reference in New Issue
Block a user