Add ApplicationConfig object to help tweaking the application / brand name used across the application.

This commit is contained in:
ganfra 2024-04-10 16:57:18 +02:00 committed by Benoit Marty
parent ffede8b13b
commit 447a10cb06
2 changed files with 47 additions and 4 deletions

View file

@ -23,6 +23,7 @@ import androidx.preference.PreferenceManager
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import io.element.android.appconfig.ApplicationConfig
import io.element.android.features.messages.impl.timeline.components.customreaction.DefaultEmojibaseProvider
import io.element.android.features.messages.impl.timeline.components.customreaction.EmojibaseProvider
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
@ -79,10 +80,9 @@ object AppModule {
fun providesBuildMeta(@ApplicationContext context: Context, buildType: BuildType) = BuildMeta(
isDebuggable = BuildConfig.DEBUG,
buildType = buildType,
applicationName = context.getString(R.string.app_name),
productionApplicationName = "Element",
// Use the same name for desktop and mobile for now
desktopApplicationName = context.getString(R.string.app_name),
applicationName = ApplicationConfig.APPLICATION_NAME.takeIf { it.isNotEmpty() } ?: context.getString(R.string.app_name),
productionApplicationName = ApplicationConfig.PRODUCTION_APPLICATION_NAME,
desktopApplicationName = ApplicationConfig.DESKTOP_APPLICATION_NAME,
applicationId = BuildConfig.APPLICATION_ID,
// TODO EAx Config.LOW_PRIVACY_LOG_ENABLE,
lowPrivacyLoggingEnabled = false,