fix: separate error message for network exception during import

This commit is contained in:
ismailnurudeen
2023-05-03 20:20:29 +01:00
parent e26e43cd91
commit 77e3284689
45 changed files with 67 additions and 19 deletions

View File

@ -1,5 +1,6 @@
package com.simplemobiletools.notes.pro.activities
import android.accounts.NetworkErrorException
import android.annotation.SuppressLint
import android.app.Activity
import android.content.ActivityNotFoundException
@ -865,6 +866,8 @@ class MainActivity : SimpleActivity() {
startActivityForResult(this, PICK_EXPORT_FILE_INTENT)
} catch (e: ActivityNotFoundException) {
toast(R.string.system_service_disabled, Toast.LENGTH_LONG)
} catch (e: NetworkErrorException) {
toast(getString(R.string.cant_load_files_over_internet), Toast.LENGTH_LONG)
} catch (e: Exception) {
showErrorToast(e)
}