Revert "Fix the "Not valid credentials" issue caused by trailing separator in server URL (#357)"

This reverts commit d9b707db8061870a8d59d75731b35d30905e4ccf.
This commit is contained in:
Ash 2023-03-19 05:02:19 +08:00
parent 4a32b00c60
commit 91e8cc5397
2 changed files with 2 additions and 9 deletions

View File

@ -12,11 +12,8 @@ import androidx.compose.material.icons.rounded.RssFeed
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalFocusManager
@ -115,9 +112,7 @@ fun AddFeverAccountDialog(
type = AccountType.Fever,
name = context.getString(R.string.fever),
securityKey = FeverSecurityKey(
serverUrl = serverUrl
.takeIf { !it.endsWith("/") }
?: serverUrl.trimEnd('/'),
serverUrl = serverUrl,
username = username,
password = password,
).toString(),

View File

@ -71,8 +71,6 @@ fun LazyItemScope.FeverConnection(
onConfirm = {
if (securityKey.serverUrl?.isNotBlank() == true) {
securityKey.serverUrl = serverUrlValue
?.takeIf { !it.endsWith("/") }
?: serverUrlValue?.trimEnd('/')
save(account, viewModel, securityKey)
serverUrlDialogVisible = false
}