-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2402068
commit 9aaeb22
Showing
23 changed files
with
240 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<resources> | ||
<string name="outln_source_code_title">GitLab</string> | ||
<string name="outln_source_code_link">"https://gitlab.com/sirekanyan.org/outline"</string> | ||
<string name="outln_source_code_title" translatable="false">GitLab</string> | ||
<string name="outln_source_code_link" translatable="false">"https://gitlab.com/sirekanyan.org/outline"</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ package org.sirekanyan.outline.ui | |
import android.content.Intent | ||
import android.content.Intent.ACTION_SENDTO | ||
import android.net.Uri | ||
import androidx.annotation.StringRes | ||
import androidx.compose.foundation.BorderStroke | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.heightIn | ||
|
@@ -77,7 +78,7 @@ fun AboutDialogContent(onDismiss: () -> Unit) { | |
confirmButton = { | ||
val context = LocalContext.current | ||
val clipboard = LocalClipboardManager.current | ||
AboutItem(Icons.Default.Email, "Send feedback") { | ||
AboutItem(Icons.Default.Email, R.string.outln_btn_send_feedback) { | ||
val email = "[email protected]" | ||
val subject = Uri.encode("Feedback: $appName $appVersion") | ||
val intent = Intent(ACTION_SENDTO, Uri.parse("mailto:$email?subject=$subject")) | ||
|
@@ -86,13 +87,13 @@ fun AboutDialogContent(onDismiss: () -> Unit) { | |
} catch (exception: Exception) { | ||
logDebug("Cannot find email app", exception) | ||
clipboard.setText(AnnotatedString(email)) | ||
context.showToast("Email is copied") | ||
context.showToast(R.string.outln_toast_email_copied) | ||
} | ||
} | ||
if (isPlayFlavor() || isDebugBuild()) { | ||
val packageName = "org.sirekanyan.outline" | ||
val playUri = "https://play.google.com/store/apps/details?id=$packageName" | ||
AboutItem(IconPlayStore, "Rate on Play Store") { | ||
AboutItem(IconPlayStore, R.string.outln_btn_rate_on_play_store) { | ||
context.openGooglePlay(playUri) | ||
onDismiss() | ||
} | ||
|
@@ -102,15 +103,15 @@ fun AboutDialogContent(onDismiss: () -> Unit) { | |
} | ||
|
||
@Composable | ||
private fun AboutItem(icon: ImageVector, text: String, onClick: () -> Unit) { | ||
private fun AboutItem(icon: ImageVector, @StringRes text: Int, onClick: () -> Unit) { | ||
TextButton( | ||
onClick = onClick, | ||
modifier = Modifier.fillMaxWidth().heightIn(min = 56.dp), | ||
border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary), | ||
) { | ||
Icon(icon, null, Modifier.padding(horizontal = 4.dp)) | ||
Text( | ||
text = text, | ||
text = stringResource(text), | ||
modifier = Modifier.weight(1f).padding(horizontal = 8.dp), | ||
maxLines = 1, | ||
overflow = TextOverflow.Ellipsis, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.