mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
add build config, use single variable in grandle file and update source to use feature flag
This commit is contained in:
parent
a355f61a7e
commit
92a44cd9d6
3 changed files with 13 additions and 7 deletions
|
@ -142,9 +142,14 @@ android {
|
|||
resValue "bool", "useLoginV1", "true"
|
||||
resValue "bool", "useLoginV2", "false"
|
||||
|
||||
|
||||
|
||||
// NotificationSettingsV2 is disabled. To be released in conjunction with iOS/Web
|
||||
resValue "bool", "useNotificationSettingsV1", "true"
|
||||
resValue "bool", "useNotificationSettingsV2", "false"
|
||||
def useNotificationSettingsV2 = false
|
||||
buildConfigField "Boolean", "USE_NOTIFICATION_SETTINGS_V2", "${useNotificationSettingsV2}"
|
||||
resValue "bool", "useNotificationSettingsV1", "${!useNotificationSettingsV2}"
|
||||
resValue "bool", "useNotificationSettingsV2", "${useNotificationSettingsV2}"
|
||||
|
||||
|
||||
buildConfigField "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy", "outboundSessionKeySharingStrategy", "im.vector.app.features.crypto.keysrequest.OutboundSessionKeySharingStrategy.WhenTyping"
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ package im.vector.app.features.home.room.list.actions
|
|||
|
||||
import androidx.annotation.StringRes
|
||||
import com.airbnb.epoxy.TypedEpoxyController
|
||||
import im.vector.app.BuildConfig
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.epoxy.bottomSheetDividerItem
|
||||
import im.vector.app.core.epoxy.bottomsheet.bottomSheetActionItem
|
||||
|
@ -55,7 +56,7 @@ class RoomListQuickActionsEpoxyController @Inject constructor(
|
|||
val roomSummary = notificationViewState.roomSummary() ?: return
|
||||
val host = this
|
||||
val showFull = state.roomListActionsArgs.mode == RoomListActionsArgs.Mode.FULL
|
||||
var isV2 = true
|
||||
var isV2 = BuildConfig.USE_NOTIFICATION_SETTINGS_V2
|
||||
|
||||
if (showFull || isV2) {
|
||||
// Preview, favorite, settings
|
||||
|
|
|
@ -30,6 +30,7 @@ import com.airbnb.mvrx.args
|
|||
import com.airbnb.mvrx.fragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import im.vector.app.BuildConfig
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.animations.AppBarStateChangeListener
|
||||
import im.vector.app.core.animations.MatrixItemAppBarStateChangeListener
|
||||
|
@ -253,13 +254,12 @@ class RoomProfileFragment @Inject constructor(
|
|||
}
|
||||
|
||||
override fun onNotificationsClicked() {
|
||||
// TODO: Use BuildConfig here when merged in
|
||||
if (false) {
|
||||
if (BuildConfig.USE_NOTIFICATION_SETTINGS_V2) {
|
||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificaitonSettings)
|
||||
} else {
|
||||
RoomListQuickActionsBottomSheet
|
||||
.newInstance(roomProfileArgs.roomId, RoomListActionsArgs.Mode.NOTIFICATIONS)
|
||||
.show(childFragmentManager, "ROOM_PROFILE_NOTIFICATIONS")
|
||||
} else {
|
||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomNotificaitonSettings)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue