mirror of
https://github.com/element-hq/element-android
synced 2024-10-25 04:06:50 +03:00
Embedded if
This commit is contained in:
parent
14162ecaa0
commit
07446d2d41
1 changed files with 9 additions and 9 deletions
|
@ -18,7 +18,6 @@
|
||||||
package im.vector.app.features.roomprofile
|
package im.vector.app.features.roomprofile
|
||||||
|
|
||||||
import com.airbnb.epoxy.TypedEpoxyController
|
import com.airbnb.epoxy.TypedEpoxyController
|
||||||
import org.matrix.android.sdk.api.crypto.RoomEncryptionTrustLevel
|
|
||||||
import im.vector.app.R
|
import im.vector.app.R
|
||||||
import im.vector.app.core.epoxy.profiles.buildProfileAction
|
import im.vector.app.core.epoxy.profiles.buildProfileAction
|
||||||
import im.vector.app.core.epoxy.profiles.buildProfileSection
|
import im.vector.app.core.epoxy.profiles.buildProfileSection
|
||||||
|
@ -26,6 +25,7 @@ import im.vector.app.core.resources.ColorProvider
|
||||||
import im.vector.app.core.resources.StringProvider
|
import im.vector.app.core.resources.StringProvider
|
||||||
import im.vector.app.core.ui.list.genericFooterItem
|
import im.vector.app.core.ui.list.genericFooterItem
|
||||||
import im.vector.app.features.settings.VectorPreferences
|
import im.vector.app.features.settings.VectorPreferences
|
||||||
|
import org.matrix.android.sdk.api.crypto.RoomEncryptionTrustLevel
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class RoomProfileController @Inject constructor(
|
class RoomProfileController @Inject constructor(
|
||||||
|
@ -71,11 +71,11 @@ class RoomProfileController @Inject constructor(
|
||||||
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
|
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
id = "settings",
|
id = "settings",
|
||||||
title = if (roomSummary.isDirect) {
|
title = stringProvider.getString(if (roomSummary.isDirect) {
|
||||||
stringProvider.getString(R.string.direct_room_profile_section_more_settings)
|
R.string.direct_room_profile_section_more_settings
|
||||||
} else {
|
} else {
|
||||||
stringProvider.getString(R.string.room_profile_section_more_settings)
|
R.string.room_profile_section_more_settings
|
||||||
},
|
}),
|
||||||
dividerColor = dividerColor,
|
dividerColor = dividerColor,
|
||||||
icon = R.drawable.ic_room_profile_settings,
|
icon = R.drawable.ic_room_profile_settings,
|
||||||
action = { callback?.onSettingsClicked() }
|
action = { callback?.onSettingsClicked() }
|
||||||
|
@ -116,11 +116,11 @@ class RoomProfileController @Inject constructor(
|
||||||
)
|
)
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
id = "leave",
|
id = "leave",
|
||||||
title = if (roomSummary.isDirect) {
|
title = stringProvider.getString(if (roomSummary.isDirect) {
|
||||||
stringProvider.getString(R.string.direct_room_profile_section_more_leave)
|
R.string.direct_room_profile_section_more_leave
|
||||||
} else {
|
} else {
|
||||||
stringProvider.getString(R.string.room_profile_section_more_leave)
|
R.string.room_profile_section_more_leave
|
||||||
},
|
}),
|
||||||
dividerColor = dividerColor,
|
dividerColor = dividerColor,
|
||||||
divider = false,
|
divider = false,
|
||||||
destructive = true,
|
destructive = true,
|
||||||
|
|
Loading…
Reference in a new issue