Skip to content

Commit

Permalink
display fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Aug 22, 2024
1 parent fd0fe17 commit cf36f91
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 14 deletions.
24 changes: 13 additions & 11 deletions Habitica/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
implementation "com.amplitude:analytics-android:$amplitude_version"

//Tests
testImplementation 'androidx.test:core:1.5.0'
testImplementation 'androidx.test:core:1.6.1'
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation "io.mockk:mockk-android:$mockk_version"
testImplementation "io.kotest:kotest-runner-junit5:$kotest_version"
Expand All @@ -71,18 +71,18 @@ dependencies {
}
androidTestImplementation "com.kaspersky.android-components:kaspresso-compose-support:1.5.1"

androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
debugImplementation 'androidx.fragment:fragment-testing:1.8.0'
androidTestImplementation 'androidx.test:core-ktx:1.5.0'
debugImplementation "androidx.test:monitor:1.6.1"
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
androidTestImplementation 'androidx.test:runner:1.6.2'
androidTestImplementation 'androidx.test:rules:1.6.1'
debugImplementation 'androidx.fragment:fragment-testing:1.8.2'
androidTestImplementation 'androidx.test:core-ktx:1.6.1'
debugImplementation "androidx.test:monitor:1.7.2"
androidTestImplementation 'androidx.test.ext:junit-ktx:1.2.1'
androidTestImplementation "io.mockk:mockk-android:$mockk_version"
androidTestImplementation "io.mockk:mockk-agent:$mockk_version"
androidTestImplementation "io.kotest:kotest-assertions-core:$kotest_version"
androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

androidTestUtil("androidx.test:orchestrator:1.4.2")
androidTestUtil("androidx.test:orchestrator:1.5.0")

implementation 'com.facebook.shimmer:shimmer:0.5.0'

Expand All @@ -105,16 +105,18 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
implementation "androidx.fragment:fragment-ktx:1.8.0"
implementation "androidx.fragment:fragment-ktx:1.8.2"
implementation "androidx.paging:paging-runtime-ktx:$paging_version"
implementation "androidx.paging:paging-compose:$paging_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
implementation "androidx.compose.material3:material3:1.2.1"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
implementation 'com.google.android.play:core:1.10.3'

implementation 'androidx.activity:activity-compose:1.9.0'
implementation 'com.google.android.play:review:2.0.1'
implementation 'com.google.android.play:review-ktx:2.0.1'

implementation 'androidx.activity:activity-compose:1.9.1'
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.compose.animation:animation:$compose_version"
implementation "androidx.compose.ui:ui-text-google-fonts:$compose_version"
Expand Down
2 changes: 2 additions & 0 deletions Habitica/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,8 @@
<string name="unlocks_x_gems_per_month">Unlocks %d Gold-purchasable Gems per month</string>
<string name="two_gems_per_month">+2 Gems each month</string>
<string name="popular">Popular</string>
<string name="choose_member">Choose Member</string>
<string name="cleared_cache">Cleared Cache</string>

<plurals name="you_x_others">
<item quantity="zero">You</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.habitrpg.android.habitica.ui.viewmodels.MainUserViewModel
import com.habitrpg.common.habitica.helpers.ExceptionHandler
import com.habitrpg.common.habitica.helpers.launchCatching
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.map
Expand Down Expand Up @@ -46,8 +47,10 @@ class SkillMemberActivity : BaseActivity() {
super.onCreate(savedInstanceState)
setupToolbar(findViewById(R.id.toolbar))
loadMemberList()
title = getString(R.string.choose_member)
}

@OptIn(ExperimentalCoroutinesApi::class)
private fun loadMemberList() {
binding.recyclerView.layoutManager = LinearLayoutManager(this)
viewAdapter = PartyMemberRecyclerViewAdapter()
Expand All @@ -66,7 +69,7 @@ class SkillMemberActivity : BaseActivity() {
.map { it?.party?.id }
.filterNotNull()
.take(1)
.onEach { socialRepository.getPartyMembers(it) }
.onEach { socialRepository.retrievePartyMembers(it, true) }
.flatMapLatest { socialRepository.getPartyMembers(it) }
.collect { viewAdapter?.data = it }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ class PreferencesFragment :
HabiticaBaseApplication.deleteDatabase(context)
lifecycleScope.launchCatching {
userRepository.retrieveUser(true, true)
(activity as? SnackbarActivity)?.showSnackbar(
content = context.getString(R.string.cleared_cache),
displayType = HabiticaSnackbar.SnackbarDisplayType.SUCCESS,
)
reloadContent(true)
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
kotest_version = '5.6.2'
kotlin_version = '1.9.24'
ktlint_version = '1.2.1'
lifecycle_version = '2.8.2'
lifecycle_version = '2.8.4'
markwon_version = '4.6.2'
mockk_version = '1.13.4'
moshi_version = '1.15.0'
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME=4.5.0
CODE=8031
CODE=8051

0 comments on commit cf36f91

Please sign in to comment.