Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import com.nextcloud.client.preferences.AppPreferences
import com.nextcloud.repository.ClientRepository
import com.nextcloud.utils.SnackbarUtil
import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.extensions.showToast
import com.nextcloud.utils.mdm.MDMConfig
import com.nextcloud.utils.text.LinkFormatter
import com.owncloud.android.MainApp
Expand Down Expand Up @@ -412,6 +413,8 @@ open class AuthenticatorActivity :
}

private fun initServerUrlLogin(savedInstanceState: Bundle?) {
// errors are shown under the address field, so updateAuthStatus() must keep the activity open
showWebViewLoginUrl = true
val binding = inflateAccountSetupLayout()
initOverallUi(binding)

Expand Down Expand Up @@ -843,7 +846,8 @@ open class AuthenticatorActivity :
authStatus = statusMapper.forAuthentication(result, isHostUrlPlainHttp, showWebViewLoginUrl, authStatus.text)

if (!showWebViewLoginUrl && statusMapper.isFatalAuthenticationError(result)) {
SnackbarUtil.show(this, authStatus.text)
// a snackbar would close together with the finishing activity
authStatus.text?.let { applicationContext.showToast(it) }
finish()
}
}
Expand Down