Add 'What's an instance' dialog in login instead of opening link
This commit is contained in:
parent
4aef72490d
commit
4c935918d6
|
@ -104,9 +104,13 @@ class LoginActivity : BaseActivity() {
|
||||||
|
|
||||||
|
|
||||||
private fun whatsAnInstance() {
|
private fun whatsAnInstance() {
|
||||||
val i = Intent(Intent.ACTION_VIEW)
|
val builder = AlertDialog.Builder(this)
|
||||||
i.data = Uri.parse("https://pixelfed.org/join")
|
builder.apply {
|
||||||
startActivity(i)
|
setView(layoutInflater.inflate(R.layout.whats_an_instance_explanation, null))
|
||||||
|
setPositiveButton(android.R.string.ok) { _, _ -> }
|
||||||
|
}
|
||||||
|
// Create the AlertDialog
|
||||||
|
builder.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideKeyboard() {
|
private fun hideKeyboard() {
|
||||||
|
|
|
@ -454,8 +454,10 @@ class ImageCarousel(
|
||||||
|
|
||||||
dataItem?.apply {
|
dataItem?.apply {
|
||||||
caption.apply {
|
caption.apply {
|
||||||
|
if(layoutCarousel){
|
||||||
binding.editMediaDescriptionLayout.visibility = INVISIBLE
|
binding.editMediaDescriptionLayout.visibility = INVISIBLE
|
||||||
tvCaption.visibility = VISIBLE
|
tvCaption.visibility = VISIBLE
|
||||||
|
}
|
||||||
currentDescription = this
|
currentDescription = this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/whats_an_instance_explanation"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:autoLink="web"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:text="@string/whats_an_instance_explanation" />
|
|
@ -28,6 +28,13 @@
|
||||||
|
|
||||||
<!-- Login page -->
|
<!-- Login page -->
|
||||||
<string name="whats_an_instance">"What's an instance?"</string>
|
<string name="whats_an_instance">"What's an instance?"</string>
|
||||||
|
<string name="whats_an_instance_explanation">"You might be confused by the text field asking for the domain of your 'instance'.
|
||||||
|
|
||||||
|
Pixelfed is a federated platform, and part of the 'fediverse', which means it can talk to other platforms which speak the same language, like Mastodon (see https://joinmastodon.org).
|
||||||
|
|
||||||
|
It also means you have to choose which server, or 'instance' of Pixelfed to use. If you don't know any, you can look here: https://pixelfed.org/join
|
||||||
|
|
||||||
|
For more info about Pixelfed, you can check here: https://pixelfed.org"</string>
|
||||||
<string name="domain_of_your_instance">Domain of your instance</string>
|
<string name="domain_of_your_instance">Domain of your instance</string>
|
||||||
<string name="connect_to_pixelfed">Connect to Pixelfed</string>
|
<string name="connect_to_pixelfed">Connect to Pixelfed</string>
|
||||||
<string name="login_connection_required_once">You need to be online to be able to add the first account and use PixelDroid :(</string>
|
<string name="login_connection_required_once">You need to be online to be able to add the first account and use PixelDroid :(</string>
|
||||||
|
|
Loading…
Reference in New Issue