Toast when nextcloud app is not found

This commit is contained in:
S1m 2024-01-16 23:04:45 +01:00
parent b787b0f9b8
commit 25d8cf397e
1 changed files with 7 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package org.unifiedpush.distributor.nextpush.account
import android.content.Context import android.content.Context
import android.util.Log import android.util.Log
import android.widget.Toast
import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException
import com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException import com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException
import org.unifiedpush.distributor.nextpush.utils.TAG import org.unifiedpush.distributor.nextpush.utils.TAG
@ -59,7 +60,12 @@ object Account {
account = this account = this
} }
} catch (e: NextcloudFilesAppAccountNotFoundException) { } catch (e: NextcloudFilesAppAccountNotFoundException) {
Log.w(TAG, "Nextcloud application is not found") Toast.makeText(
context,
"Nextcloud application not found",
Toast.LENGTH_SHORT
).show()
Log.w(TAG, "Nextcloud application not found")
null null
} catch (e: NoCurrentAccountSelectedException) { } catch (e: NoCurrentAccountSelectedException) {
if (uninitialized) { if (uninitialized) {