mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed display issue if upload logs button is hidden
This commit is contained in:
parent
77e99fbfd3
commit
c4fa68858c
3 changed files with 7 additions and 3 deletions
|
|
@ -57,6 +57,10 @@ class CorePreferences @UiThread constructor(private val context: Context) {
|
|||
config.setBool("app", "first_6.0_launch", value)
|
||||
}
|
||||
|
||||
@get:WorkerThread
|
||||
val checkForUpdateServerUrl: String
|
||||
get() = config.getString("misc", "version_check_url_root", "").orEmpty()
|
||||
|
||||
@get:WorkerThread @set:WorkerThread
|
||||
var conditionsAndPrivacyPolicyAccepted: Boolean
|
||||
get() = config.getBool("app", "read_and_agree_terms_and_privacy", false)
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import androidx.lifecycle.viewModelScope
|
|||
import kotlinx.coroutines.launch
|
||||
import org.linphone.BuildConfig
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.R
|
||||
import org.linphone.core.Core
|
||||
import org.linphone.core.CoreListenerStub
|
||||
|
|
@ -136,8 +137,7 @@ class HelpViewModel @UiThread constructor() : GenericViewModel() {
|
|||
coreContext.postOnCoreThread { core ->
|
||||
core.addListener(coreListener)
|
||||
|
||||
val checkUpdateServerUrl = core.config.getString("misc", "version_check_url_root", "")
|
||||
checkUpdateAvailable.postValue(!checkUpdateServerUrl.isNullOrEmpty())
|
||||
checkUpdateAvailable.postValue(corePreferences.checkForUpdateServerUrl.isNotEmpty())
|
||||
uploadLogsAvailable.postValue(!core.logCollectionUploadServerUrl.isNullOrEmpty())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/help_troubleshooting_app_version_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/send_logs"
|
||||
app:layout_constraintTop_toBottomOf="@id/clean_logs"
|
||||
app:layout_constraintStart_toEndOf="@id/app_version_icon"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue