mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 10:54:36 -06:00
[UI/App] Add Open repo button in build info dialog.
This commit is contained in:
parent
76838fcc41
commit
93233f6afa
@ -13,6 +13,7 @@ import okhttp3.Request
|
|||||||
import pl.szczodrzynski.edziennik.*
|
import pl.szczodrzynski.edziennik.*
|
||||||
import pl.szczodrzynski.edziennik.data.api.szkolny.interceptor.Signing
|
import pl.szczodrzynski.edziennik.data.api.szkolny.interceptor.Signing
|
||||||
import pl.szczodrzynski.edziennik.ui.modules.base.BuildInvalidActivity
|
import pl.szczodrzynski.edziennik.ui.modules.base.BuildInvalidActivity
|
||||||
|
import pl.szczodrzynski.edziennik.utils.Utils
|
||||||
|
|
||||||
class BuildManager(val app: App) : CoroutineScope {
|
class BuildManager(val app: App) : CoroutineScope {
|
||||||
|
|
||||||
@ -109,6 +110,13 @@ class BuildManager(val app: App) : CoroutineScope {
|
|||||||
.setTitle(R.string.build_details)
|
.setTitle(R.string.build_details)
|
||||||
.setMessage(message)
|
.setMessage(message)
|
||||||
.setPositiveButton(R.string.ok, null)
|
.setPositiveButton(R.string.ok, null)
|
||||||
|
.setNeutralButton(R.string.build_dialog_open_repo) { _, _ ->
|
||||||
|
val url = if (gitRemote == null)
|
||||||
|
"https://szkolny.eu/github/android"
|
||||||
|
else
|
||||||
|
"https://github.com/$gitRemote"
|
||||||
|
Utils.openUrl(activity, url)
|
||||||
|
}
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1423,4 +1423,5 @@
|
|||||||
<string name="build_invalid_title">Informacja dotycząca wersji aplikacji</string>
|
<string name="build_invalid_title">Informacja dotycząca wersji aplikacji</string>
|
||||||
<string name="settings_about_version_details_text">Szczegóły wersji</string>
|
<string name="settings_about_version_details_text">Szczegóły wersji</string>
|
||||||
<string name="settings_about_version_details_subtext">Informacje o kompilacji</string>
|
<string name="settings_about_version_details_subtext">Informacje o kompilacji</string>
|
||||||
|
<string name="build_dialog_open_repo">Sprawdź kod</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user