Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix BuildConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
M3DZIK committed Oct 14, 2023
1 parent 069ff3c commit a268f19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import dev.medzik.android.components.PickerDialog
import dev.medzik.android.components.navigate
import dev.medzik.android.components.rememberDialogState
import dev.medzik.libcrypto.Hex
import dev.medzik.librepass.android.BuildConfig
import dev.medzik.librepass.android.R
import dev.medzik.librepass.android.data.Credentials
import dev.medzik.librepass.android.data.getRepository
Expand Down Expand Up @@ -213,13 +214,11 @@ fun LoginScreen(navController: NavController) {
Text(stringResource(R.string.Button_Login))
}

val servers = listOf(Server.PRODUCTION)
var servers = listOf(Server.PRODUCTION)
.plus(context.readKey(StoreKey.CustomServers))
.plus("custom_server")

// TODO
// if (BuildConfig.DEBUG)
// servers = servers.plus(Server.TEST)
if (BuildConfig.DEBUG) servers = servers.plus(Server.TEST)

PickerDialog(
state = serverChoiceDialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import dev.medzik.android.components.LoadingButton
import dev.medzik.android.components.PickerDialog
import dev.medzik.android.components.navigate
import dev.medzik.android.components.rememberDialogState
import dev.medzik.librepass.android.BuildConfig
import dev.medzik.librepass.android.R
import dev.medzik.librepass.android.ui.Screen
import dev.medzik.librepass.android.utils.SecretStore.readKey
Expand Down Expand Up @@ -178,13 +179,11 @@ fun RegisterScreen(navController: NavController) {
Text(stringResource(R.string.Button_Register))
}

val servers = listOf(Server.PRODUCTION)
var servers = listOf(Server.PRODUCTION)
.plus(context.readKey(StoreKey.CustomServers))
.plus("custom_server")

// TODO
// if (BuildConfig.DEBUG)
// servers = servers.plus(Server.TEST)
if (BuildConfig.DEBUG) servers = servers.plus(Server.TEST)

PickerDialog(
state = serverChoiceDialog,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.medzik.librepass.android.utils.exception

import android.content.Context
import dev.medzik.librepass.android.BuildConfig
import dev.medzik.librepass.android.R
import dev.medzik.librepass.android.utils.showToast
import dev.medzik.librepass.client.errors.ApiException
Expand All @@ -13,10 +14,9 @@ import kotlinx.coroutines.launch
* Log exception if debugging is enabled.
*/
fun Exception.debugLog() {
// TODO
// if (BuildConfig.DEBUG) {
printStackTrace()
// }
if (BuildConfig.DEBUG) {
printStackTrace()
}
}

/**
Expand Down

0 comments on commit a268f19

Please sign in to comment.