package refactor element x to bchot

This commit is contained in:
2025-12-19 15:54:24 +07:00
parent 8c3e4f491f
commit c83a13e9fe
74 changed files with 220 additions and 93 deletions

View File

@@ -13,8 +13,8 @@ import io.element.android.libraries.core.meta.BuildType
fun BuildMeta.isElement(): Boolean {
return when (buildType) {
BuildType.RELEASE -> applicationId == "io.element.android.x"
BuildType.NIGHTLY -> applicationId == "io.element.android.x.nightly"
BuildType.DEBUG -> applicationId == "io.element.android.x.debug"
BuildType.RELEASE -> applicationId == "id.databisnis.android.bchot"
BuildType.NIGHTLY -> applicationId == "id.databisnis.android.bchot.nightly"
BuildType.DEBUG -> applicationId == "id.databisnis.android.bchot.debug"
}
}

View File

@@ -52,7 +52,7 @@ data class NotifiableMessageEvent(
override val description: String = body ?: ""
// Example of value:
// content://io.element.android.x.debug.notifications.fileprovider/downloads/temp/notif/matrix.org/XGItzSDOnSyXjYtOPfiKexDJ
// content://id.databisnis.android.bchot.debug.notifications.fileprovider/downloads/temp/notif/matrix.org/XGItzSDOnSyXjYtOPfiKexDJ
val imageUri: Uri?
get() = imageUriString?.toUri()
}

View File

@@ -41,7 +41,7 @@ class UserPushStoreDataStore(
init {
// Migrate legacy data. Previous file can be too long if the userId is too long. The userId can be up to 255 chars.
// Example of long file path, with `averylonguserid` replacing a very longer name
// /data/user/0/io.element.android.x.debug/files/datastore/push_store_@averylonguserid:example.org.preferences_pb
// /data/user/0/id.databisnis.android.bchot.debug/files/datastore/push_store_@averylonguserid:example.org.preferences_pb
val legacyFile = context.preferencesDataStoreFile("push_store_$userId")
if (legacyFile.exists()) {
Timber.d("Migrating legacy push data store for $userId")