mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
refactor (move methods)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
d6cec7f6b7
commit
797c062981
@ -207,6 +207,51 @@ class ConversationInfoActivity :
|
||||
binding.avatarImage.let { ViewCompat.setTransitionName(it, "userAvatar.transitionTag") }
|
||||
}
|
||||
|
||||
private fun setupActionBar() {
|
||||
setSupportActionBar(binding.conversationInfoToolbar)
|
||||
binding.conversationInfoToolbar.setNavigationOnClickListener {
|
||||
onBackPressed()
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
||||
supportActionBar?.title = if (hasAvatarSpacing) {
|
||||
" " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||
} else {
|
||||
resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||
}
|
||||
viewThemeUtils.material.themeToolbar(binding.conversationInfoToolbar)
|
||||
}
|
||||
|
||||
private fun themeSwitchPreferences() {
|
||||
binding.run {
|
||||
listOf(
|
||||
binding.webinarInfoView.conversationInfoLobby,
|
||||
binding.notificationSettingsView.callNotifications,
|
||||
binding.notificationSettingsView.conversationInfoPriorityConversation,
|
||||
binding.guestAccessView.guestAccessAllowSwitch,
|
||||
binding.guestAccessView.guestAccessPasswordSwitch
|
||||
).forEach(viewThemeUtils.talk::colorSwitchPreference)
|
||||
}
|
||||
}
|
||||
|
||||
private fun themeCategories() {
|
||||
binding.run {
|
||||
listOf(
|
||||
conversationInfoName,
|
||||
conversationDescription,
|
||||
otherRoomOptions,
|
||||
participantsListCategory,
|
||||
ownOptions,
|
||||
categorySharedItems,
|
||||
categoryConversationSettings,
|
||||
binding.guestAccessView.guestAccessCategory,
|
||||
binding.webinarInfoView.conversationInfoWebinar,
|
||||
binding.notificationSettingsView.notificationSettingsCategory
|
||||
).forEach(viewThemeUtils.talk::colorPreferenceCategory)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
when (resultCode) {
|
||||
@ -307,51 +352,6 @@ class ConversationInfoActivity :
|
||||
})
|
||||
}
|
||||
|
||||
private fun setupActionBar() {
|
||||
setSupportActionBar(binding.conversationInfoToolbar)
|
||||
binding.conversationInfoToolbar.setNavigationOnClickListener {
|
||||
onBackPressed()
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
supportActionBar?.setDisplayShowHomeEnabled(true)
|
||||
supportActionBar?.setIcon(ColorDrawable(resources!!.getColor(android.R.color.transparent)))
|
||||
supportActionBar?.title = if (hasAvatarSpacing) {
|
||||
" " + resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||
} else {
|
||||
resources!!.getString(R.string.nc_conversation_menu_conversation_info)
|
||||
}
|
||||
viewThemeUtils.material.themeToolbar(binding.conversationInfoToolbar)
|
||||
}
|
||||
|
||||
private fun themeSwitchPreferences() {
|
||||
binding.run {
|
||||
listOf(
|
||||
binding.webinarInfoView.conversationInfoLobby,
|
||||
binding.notificationSettingsView.callNotifications,
|
||||
binding.notificationSettingsView.conversationInfoPriorityConversation,
|
||||
binding.guestAccessView.guestAccessAllowSwitch,
|
||||
binding.guestAccessView.guestAccessPasswordSwitch
|
||||
).forEach(viewThemeUtils.talk::colorSwitchPreference)
|
||||
}
|
||||
}
|
||||
|
||||
private fun themeCategories() {
|
||||
binding.run {
|
||||
listOf(
|
||||
conversationInfoName,
|
||||
conversationDescription,
|
||||
otherRoomOptions,
|
||||
participantsListCategory,
|
||||
ownOptions,
|
||||
categorySharedItems,
|
||||
categoryConversationSettings,
|
||||
binding.guestAccessView.guestAccessCategory,
|
||||
binding.webinarInfoView.conversationInfoWebinar,
|
||||
binding.notificationSettingsView.notificationSettingsCategory
|
||||
).forEach(viewThemeUtils.talk::colorPreferenceCategory)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSharedItems() {
|
||||
val intent = Intent(this, SharedItemsActivity::class.java)
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
|
Loading…
Reference in New Issue
Block a user