mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
wearos fixes
This commit is contained in:
parent
6c65e1108e
commit
0be832f63f
9 changed files with 15 additions and 20 deletions
|
|
@ -1,2 +1,2 @@
|
|||
NAME=4.3
|
||||
CODE=6581
|
||||
CODE=6631
|
||||
|
|
@ -24,7 +24,7 @@ android {
|
|||
targetSdk target_sdk
|
||||
compileSdk 34
|
||||
versionCode app_version_code + 1
|
||||
versionName app_version_name
|
||||
versionName "${app_version_name}w"
|
||||
buildConfigField "String", "TESTING_LEVEL", "\"production\""
|
||||
|
||||
def formattedDate = new Date().format('yyMMdd')
|
||||
|
|
@ -48,7 +48,6 @@ android {
|
|||
debug {
|
||||
minifyEnabled false
|
||||
debuggable true
|
||||
applicationIdSuffix ".debug"
|
||||
ext.enableCrashlytics = false
|
||||
ext.alwaysUpdateBuildId = false
|
||||
resValue "string", "app_name", "Habitica Debug"
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ abstract class BaseActivity<B : ViewBinding, VM : BaseViewModel> : ComponentActi
|
|||
val info = Tasks.await(
|
||||
capabilityClient.getCapability(
|
||||
permission,
|
||||
CapabilityClient.FILTER_REACHABLE
|
||||
CapabilityClient.FILTER_ALL
|
||||
)
|
||||
)
|
||||
val nodeID = info.nodes.firstOrNull()
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
package com.habitrpg.wearos.habitica.ui.activities
|
||||
|
||||
import android.app.Activity
|
||||
import android.app.AlertDialog
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.method.PasswordTransformationMethod
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.view.isVisible
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ class RYAActivity : BaseActivity<ActivityRyaBinding, RYAViewModel>() {
|
|||
viewModel.tasks.observe(
|
||||
this,
|
||||
object : Observer<List<Task>> {
|
||||
override fun onChanged(list: List<Task>) {
|
||||
if (list.isEmpty()) {
|
||||
override fun onChanged(value: List<Task>) {
|
||||
if (value.isEmpty()) {
|
||||
runCron()
|
||||
viewModel.tasks.removeObserver(this)
|
||||
} else {
|
||||
binding.scrollView.isVisible = true
|
||||
createTaskListViews(list)
|
||||
createTaskListViews(value)
|
||||
viewModel.tasks.removeObserver(this)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ class ConnectedActionChipView(context: Context, attrs: AttributeSet? = null) :
|
|||
|
||||
private fun checkIfPhoneAvailable() {
|
||||
MainScope().launch(Dispatchers.IO) {
|
||||
val result = Tasks.await(capabilityClient.getCapability("open_activity", CapabilityClient.FILTER_REACHABLE))
|
||||
launch(Dispatchers.Main) {
|
||||
isEnabled = result.nodes.firstOrNull { it.isNearby } != null
|
||||
alpha = if (isEnabled) 1.0f else 0.7f
|
||||
}
|
||||
capabilityClient.addListener( {
|
||||
launch(Dispatchers.Main) {
|
||||
isEnabled = it.nodes.firstOrNull { it.isNearby } != null
|
||||
alpha = if (isEnabled) 1.0f else 0.7f
|
||||
}
|
||||
}, "open_activity")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
<string name="sign_in">Entrar</string>
|
||||
<string name="sign_in_on_phone">Entrar no Celular</string>
|
||||
<string name="create_account">Criar Conta</string>
|
||||
<string name="sign_in_password">Entrar com senha</string>
|
||||
<string name="continue_text">Continuar</string>
|
||||
<string name="you_ran_out_of_hp">Você ficou sem Vida</string>
|
||||
<string name="faint_description">Você perdeu um Nível, Experiência e Ouro. Não desista!</string>
|
||||
|
|
@ -41,4 +40,4 @@
|
|||
<string name="starting_your_day">Começando seu Dia...</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="other_options">Outras Opções</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
<string name="sign_in">Войти</string>
|
||||
<string name="other_options">Другие опции</string>
|
||||
<string name="create_account">Создать аккаунт</string>
|
||||
<string name="sign_in_password">Войти с паролем</string>
|
||||
<string name="continue_text">Продолжить</string>
|
||||
<string name="day_start">Начало дня</string>
|
||||
<string name="start_new_day">Начать новый день</string>
|
||||
|
|
@ -34,4 +33,4 @@
|
|||
<string name="all_done_today">Все задачи сегодня выполнены!</string>
|
||||
<string name="sign_in_on_phone">Войти на телефоне</string>
|
||||
<string name="continue_on_your_phone">Продолжить на телефоне</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
<string name="sign_in_on_phone">Sign in on phone</string>
|
||||
<string name="other_options">Other options</string>
|
||||
<string name="create_account">Create account</string>
|
||||
<string name="sign_in_password">Sign in with password</string>
|
||||
<string name="continue_text">Continue</string>
|
||||
<string name="you_ran_out_of_hp">You ran out of HP</string>
|
||||
<string name="faint_description">You lost a Level, Exp, and Gold. Don’t give up!</string>
|
||||
|
|
@ -40,4 +39,4 @@
|
|||
<string name="all_done_today">All done today!</string>
|
||||
<string name="starting_your_day">Starting your Day...</string>
|
||||
<string name="disconnected">Disconnected</string>
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in a new issue