Skip to content

Commit

Permalink
Fix not update the dataset when the first launch
Browse files Browse the repository at this point in the history
  • Loading branch information
a1573595 committed Mar 17, 2024
1 parent 5c65442 commit cdc6504
Show file tree
Hide file tree
Showing 82 changed files with 25 additions and 195 deletions.
18 changes: 4 additions & 14 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

This file was deleted.

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
76 changes: 1 addition & 75 deletions .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
76 changes: 1 addition & 75 deletions .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@ dependencies {
def retrofit_version = "2.9.0"
def okHttp_version = '4.12.0'
def room_version = "2.6.1"
def paging_version = "3.2.1"

implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.activity:activity-ktx:1.8.2'

implementation "androidx.paging:paging-runtime-ktx:$paging_version"
implementation "androidx.paging:paging-rxjava3:$paging_version"

implementation 'com.google.android.gms:play-services-maps:18.2.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
implementation 'com.google.android.gms:play-services-location:21.2.0'
implementation 'com.google.maps.android:android-maps-utils:3.8.2'

implementation 'io.reactivex.rxjava3:rxkotlin:3.0.1'
Expand All @@ -86,14 +90,14 @@ dependencies {
implementation "androidx.sqlite:sqlite-ktx:2.4.0"

implementation 'com.jakewharton.timber:timber:5.0.1'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.13'

testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.arch.core:core-testing:2.2.0'
testImplementation 'androidx.test.ext:junit-ktx:1.1.5'
testImplementation 'androidx.test:core-ktx:1.5.0'
testImplementation 'org.robolectric:robolectric:4.11.1'
testImplementation 'io.mockk:mockk:1.13.9'
testImplementation 'io.mockk:mockk:1.13.10'

androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ class MainViewModel : BaseViewModel {
val dataSetEvent: MutableLiveData<Event<List<ParkingLot>>> = MutableLiveData()

fun loadDataSet() {
addDisposable(repository.getUpdateTime()
.subscribe {
getParkingLots(it)
}
addDisposable(
repository.getUpdateTime()
.subscribe({
getParkingLots(it)
}, {
updateDataSet()
})
)
}

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.2' apply false
id 'com.android.library' version '8.2.2' apply false
id 'com.android.application' version '8.3.0' apply false
id 'com.android.library' version '8.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jan 31 10:15:43 CST 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit cdc6504

Please sign in to comment.