diff --git a/app/src/main/java/io/heckel/ntfy/ui/AddFragment.kt b/app/src/main/java/io/heckel/ntfy/ui/AddFragment.kt
index 594e757..a280c2d 100644
--- a/app/src/main/java/io/heckel/ntfy/ui/AddFragment.kt
+++ b/app/src/main/java/io/heckel/ntfy/ui/AddFragment.kt
@@ -8,10 +8,7 @@ import android.text.Editable
import android.text.TextWatcher
import android.util.Log
import android.view.View
-import android.widget.ArrayAdapter
-import android.widget.AutoCompleteTextView
-import android.widget.Button
-import android.widget.CheckBox
+import android.widget.*
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.lifecycleScope
import com.google.android.material.textfield.TextInputEditText
@@ -32,7 +29,7 @@ class AddFragment : DialogFragment() {
private lateinit var baseUrlLayout: TextInputLayout
private lateinit var baseUrlText: AutoCompleteTextView
private lateinit var useAnotherServerCheckbox: CheckBox
- private lateinit var useAnotherServerDescription: View
+ private lateinit var useAnotherServerDescription: TextView
private lateinit var instantDeliveryBox: View
private lateinit var instantDeliveryCheckbox: CheckBox
private lateinit var instantDeliveryDescription: View
@@ -70,6 +67,13 @@ class AddFragment : DialogFragment() {
useAnotherServerCheckbox = view.findViewById(R.id.add_dialog_use_another_server_checkbox)
useAnotherServerDescription = view.findViewById(R.id.add_dialog_use_another_server_description)
+ // Set "Use another server" description based on flavor
+ useAnotherServerDescription.text = if (BuildConfig.FIREBASE_AVAILABLE) {
+ getString(R.string.add_dialog_use_another_server_description)
+ } else {
+ getString(R.string.add_dialog_use_another_server_description_noinstant)
+ }
+
// Base URL dropdown behavior; Oh my, why is this so complicated?!
val toggleEndIcon = {
if (baseUrlText.text.isNotEmpty()) {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index fda0730..34bc8c3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -79,6 +79,10 @@
You can subscribe to topics from your own server. This option requires a foreground service and
consumes more power, but also delivers notifications faster (even in doze mode).
+
+ You can subscribe to topics from your own server. Simply type in the base
+ URL of your server.
+
Instant delivery in doze mode
Ensures that messages are immediately delivered, even if the device is inactive or in doze mode.