mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-23 19:55:11 +00:00
fixed build
This commit is contained in:
parent
d5fecfb2c0
commit
5275871933
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ import androidx.fragment.app.DialogFragment
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.google.android.material.button.MaterialButton
|
import com.google.android.material.button.MaterialButton
|
||||||
import com.vanced.manager.R
|
import com.vanced.manager.R
|
||||||
import com.vanced.manager.utils.InternetTools.getLatestVancedUrl
|
import com.vanced.manager.utils.InternetTools.baseUrl
|
||||||
|
|
||||||
class URLChangeFragment : DialogFragment() {
|
class URLChangeFragment : DialogFragment() {
|
||||||
|
|
||||||
|
@ -29,13 +29,13 @@ class URLChangeFragment : DialogFragment() {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val urlField = view.findViewById<EditText>(R.id.url_input)
|
val urlField = view.findViewById<EditText>(R.id.url_input)
|
||||||
val prefs = PreferenceManager.getDefaultSharedPreferences(activity)
|
val prefs = PreferenceManager.getDefaultSharedPreferences(activity)
|
||||||
urlField.hint = prefs.getString("install_url", activity?.let { getLatestVancedUrl(it) })
|
urlField.hint = prefs.getString("install_url", baseUrl)
|
||||||
view.findViewById<MaterialButton>(R.id.url_save).setOnClickListener {
|
view.findViewById<MaterialButton>(R.id.url_save).setOnClickListener {
|
||||||
prefs.edit().putString("install_url", urlField.text.toString()).apply()
|
prefs.edit().putString("install_url", urlField.text.toString()).apply()
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
view.findViewById<MaterialButton>(R.id.url_reset).setOnClickListener {
|
view.findViewById<MaterialButton>(R.id.url_reset).setOnClickListener {
|
||||||
prefs.edit().putString("install_url", activity?.let { getLatestVancedUrl(it) }).apply()
|
prefs.edit().putString("install_url", baseUrl).apply()
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue