Remove more instant delivery test for F-Droid

This commit is contained in:
Philipp Heckel 2022-01-12 23:38:50 -05:00
parent ca217d8275
commit 3b9f3f2e52
2 changed files with 13 additions and 5 deletions

View file

@ -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()) {

View file

@ -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).
</string>
<string name="add_dialog_use_another_server_description_noinstant">
You can subscribe to topics from your own server. Simply type in the base
URL of your server.
</string>
<string name="add_dialog_instant_delivery">Instant delivery in doze mode</string>
<string name="add_dialog_instant_delivery_description">
Ensures that messages are immediately delivered, even if the device is inactive or in doze mode.