diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt index d9d549b..975d4cf 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/BaseActivity.kt | |||
@@ -85,12 +85,12 @@ abstract class BaseActivity : AppCompatActivity() { | |||
85 | fun aboutDialog(m: MenuItem) { | 85 | fun aboutDialog(m: MenuItem) { |
86 | AlertDialog.Builder(this) | 86 | AlertDialog.Builder(this) |
87 | .setTitle(resources.getString(R.string.app_name)) | 87 | .setTitle(resources.getString(R.string.app_name)) |
88 | .setMessage(resources.getString(R.string.app_short_desc) + "\n\n" + | 88 | .setMessage(resources.getString(R.string.about_app_short_desc) + "\n\n" + |
89 | resources.getString(R.string.app_copyright) + " " + | 89 | resources.getString(R.string.about_app_copyright) + " " + |
90 | resources.getString(R.string.app_license) + "\n\n" + | 90 | resources.getString(R.string.about_app_license) + "\n\n" + |
91 | AppInfo.all()) | 91 | AppInfo.all()) |
92 | .setNeutralButton(R.string.action_open_project_website) { _, _ -> App.openURL(resources.getString(R.string.app_website_url)) } | 92 | .setNeutralButton(R.string.about_app_open_project_website) { _, _ -> App.openURL(resources.getString(R.string.about_app_website_url)) } |
93 | .setPositiveButton(R.string.action_close) { _, _ -> Unit } | 93 | .setPositiveButton(R.string.generic_action_close) { _, _ -> Unit } |
94 | .show() | 94 | .show() |
95 | } | 95 | } |
96 | 96 | ||
@@ -103,18 +103,18 @@ abstract class BaseActivity : AppCompatActivity() { | |||
103 | CrashRecorder.dismissPreviousCrash() | 103 | CrashRecorder.dismissPreviousCrash() |
104 | 104 | ||
105 | AlertDialog.Builder(this) | 105 | AlertDialog.Builder(this) |
106 | .setTitle(R.string.title_app_crash) | 106 | .setTitle(R.string.crash_modal_title) |
107 | .setMessage(listOf( | 107 | .setMessage(listOf( |
108 | resources.getString(R.string.message_app_crash), | 108 | resources.getString(R.string.crash_modal_message), |
109 | resources.getString(R.string.message_crash_logged, AppPaths.appLogFile().absolutePath) | 109 | resources.getString(R.string.crash_modal_crash_logged, AppPaths.appLogFile().absolutePath) |
110 | ).joinToString("\n\n")) | 110 | ).joinToString("\n\n")) |
111 | .setNeutralButton(R.string.action_send_report) { _, _ -> | 111 | .setNeutralButton(R.string.crash_modal_action_send_report) { _, _ -> |
112 | App.sendMail( | 112 | App.sendMail( |
113 | resources.getString(R.string.app_dev_email), | 113 | resources.getString(R.string.crash_modal_dev_email), |
114 | listOf(R.string.app_name, R.string.title_app_crash).joinToString(" / ", transform = resources::getString), | 114 | listOf(R.string.app_name, R.string.crash_modal_title).joinToString(" / ", transform = resources::getString), |
115 | AppPaths.appLogFile().let { if (it.exists()) it.readText() else "" }) | 115 | AppPaths.appLogFile().let { if (it.exists()) it.readText() else "" }) |
116 | } | 116 | } |
117 | .setPositiveButton(R.string.action_close) { _, _ -> Unit } | 117 | .setPositiveButton(R.string.generic_action_close) { _, _ -> Unit } |
118 | .show() | 118 | .show() |
119 | } | 119 | } |
120 | 120 | ||
@@ -125,6 +125,6 @@ abstract class BaseActivity : AppCompatActivity() { | |||
125 | fun notify(msg: String) = Snackbar.make(base_activity_frame, msg, Snackbar.LENGTH_LONG).show() | 125 | fun notify(msg: String) = Snackbar.make(base_activity_frame, msg, Snackbar.LENGTH_LONG).show() |
126 | 126 | ||
127 | fun showErrorDialog(msg: String): AlertDialog = AlertDialog.Builder(this) | 127 | fun showErrorDialog(msg: String): AlertDialog = AlertDialog.Builder(this) |
128 | .setTitle(R.string.title_error).setMessage(msg) | 128 | .setTitle(R.string.generic_title_error).setMessage(msg) |
129 | .setPositiveButton(R.string.action_close) { _, _ -> Unit }.show() | 129 | .setPositiveButton(R.string.generic_action_close) { _, _ -> Unit }.show() |
130 | } | 130 | } |