Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
SettingsPage: add telegram link
Browse files Browse the repository at this point in the history
Signed-off-by: Lucchetto <[email protected]>
  • Loading branch information
Lucchetto committed Feb 13, 2023
1 parent 06dfda4 commit c71ea74
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Results on Qualcomm Snapdragon 855 (Vulkan)
<span>&nbsp;</span>
</p>

## 💬 Community
You can join the [Telegram group](https://t.me/super_image) for support, discussions about AI image processing, and off-topic stuff

## 協 Contribute
You can submit feedbacks or bug reports by [opening an issue](https://github.com/Lucchetto/SuperImage/issues/new). Pull requests are welcome !

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ fun SettingsPage(viewModel: SettingsPageViewModel, navController: NavHostControl
label = { Text(stringResource(id = R.string.theme_title)) }
)
}
item {
val context = LocalContext.current
ListItem(
leadingIcon = {
Icon(painterResource(id = R.drawable.ic_telegram_24), contentDescription = null)
},
label = { Text(stringResource(id = R.string.telegram_group_title)) },
content = { Text(stringResource(id = R.string.telegram_group_desc)) }
) {
SettingsPageViewModel.openTelegramGroup(context)
}
}
item {
val context = LocalContext.current
ListItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ class SettingsPageViewModel(application: Application): AndroidViewModel(applicat
fun openGithubPage(context: Context) {
context.startActivity(IntentUtils.actionViewNewTask("https://$GITHUB_PAGE_URL"))
}

fun openTelegramGroup(context: Context) {
context.startActivity(IntentUtils.actionViewNewTask("https://t.me/super_image"))
}
}
}
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/ic_telegram_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<vector android:height="24dp" android:viewportHeight="16"
android:viewportWidth="16" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M16,8A8,8 0,1 1,0 8a8,8 0,0 1,16 0zM8.287,5.906c-0.778,0.324 -2.334,0.994 -4.666,2.01 -0.378,0.15 -0.577,0.298 -0.595,0.442 -0.03,0.243 0.275,0.339 0.69,0.47l0.175,0.055c0.408,0.133 0.958,0.288 1.243,0.294 0.26,0.006 0.549,-0.1 0.868,-0.32 2.179,-1.471 3.304,-2.214 3.374,-2.23 0.05,-0.012 0.12,-0.026 0.166,0.016 0.047,0.041 0.042,0.12 0.037,0.141 -0.03,0.129 -1.227,1.241 -1.846,1.817 -0.193,0.18 -0.33,0.307 -0.358,0.336a8.154,8.154 0,0 1,-0.188 0.186c-0.38,0.366 -0.664,0.64 0.015,1.088 0.327,0.216 0.589,0.393 0.85,0.571 0.284,0.194 0.568,0.387 0.936,0.629 0.093,0.06 0.183,0.125 0.27,0.187 0.331,0.236 0.63,0.448 0.997,0.414 0.214,-0.02 0.435,-0.22 0.547,-0.82 0.265,-1.417 0.786,-4.486 0.906,-5.751a1.426,1.426 0,0 0,-0.013 -0.315,0.337 0.337,0 0,0 -0.114,-0.217 0.526,0.526 0,0 0,-0.31 -0.093c-0.3,0.005 -0.763,0.166 -2.984,1.09z"/>
</vector>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
<string name="dark_label">Dark</string>
<string name="project_page_title">Project page</string>
<string name="project_page_desc">Ask questions or contribute on GitHub</string>
<string name="telegram_group_title">Telegram group</string>
<string name="telegram_group_desc">Join the group for support, discussions about AI image processing, and off-topic stuff</string>
<string name="version_title">Version</string>

<string name="upscaling_worker_notification_title">Upscaling %1$s</string>
Expand Down

0 comments on commit c71ea74

Please sign in to comment.