Skip to content

Commit

Permalink
complies google policy, updates dependencies, lints
Browse files Browse the repository at this point in the history
  • Loading branch information
yudanhezhongweijie committed May 6, 2023
1 parent b96d4e9 commit f326e7d
Show file tree
Hide file tree
Showing 10 changed files with 288 additions and 236 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# ChangeLog 更新日志
- 1.6.10
- comply google play policy
- updates dependencies

- 1.6.08
- 重启灌铅
- 更新库
- 修复安卓11权限问题

- 1.6.06
- 新增自定义板块展开设置
- 修复发言历史保存错误
Expand Down
28 changes: 14 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ android {
applicationId "com.laotoua.dawnislandk"
minSdkVersion 23
targetSdkVersion 33
versionCode 67
versionName "v1.6.08"
versionCode 69
versionName "v1.6.10"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -114,38 +114,38 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.10.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.tencent:mmkv:1.2.13'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'

implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation "androidx.activity:activity-ktx:1.6.1"
implementation "androidx.fragment:fragment-ktx:1.5.5"
implementation "androidx.recyclerview:recyclerview:1.3.0"
implementation "androidx.activity:activity-ktx:1.7.1"
implementation "androidx.fragment:fragment-ktx:1.5.7"

def lifecycle_version = "2.5.1"
def lifecycle_version = "2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"


implementation 'com.google.android.material:material:1.8.0-rc01'
implementation 'com.google.android.material:material:1.9.0'

implementation "androidx.appcompat:appcompat:1.7.0-alpha01"
implementation "androidx.appcompat:appcompat:1.7.0-alpha02"

implementation "androidx.constraintlayout:constraintlayout:2.1.4"

implementation 'com.jakewharton.timber:timber:4.7.1'

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.13.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.13.0'
implementation 'com.squareup.moshi:moshi-kotlin:1.14.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'

implementation 'com.github.JessYanCoding:RetrofitUrlManager:v1.4.0'

Expand Down Expand Up @@ -183,7 +183,7 @@ dependencies {
implementation 'id.zelory:compressor:3.0.1'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'

def room_version = "2.5.0"
def room_version = "2.6.0-alpha01"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
Expand All @@ -193,7 +193,7 @@ dependencies {
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

def dagger_version = '2.42'
def dagger_version = '2.46'
implementation "com.google.dagger:dagger:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"
// implementation "com.google.dagger:dagger-android:$dagger_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.laotoua.dawnislandk.data.local.entity.LuweiNotice
import com.laotoua.dawnislandk.data.local.entity.NMBNotice
import com.laotoua.dawnislandk.data.local.entity.Release
import com.laotoua.dawnislandk.data.remote.APIDataResponse
import com.laotoua.dawnislandk.data.remote.APIMessageResponse
import com.laotoua.dawnislandk.data.remote.NMBServiceClient
import com.laotoua.dawnislandk.util.DawnConstants
import com.laotoua.dawnislandk.util.lazyOnMainOnly
Expand Down Expand Up @@ -418,6 +419,26 @@ class ApplicationDataStore @Inject constructor(
mmkv.putBoolean(DawnConstants.ACKNOWLEDGE_POSTING_RULES, true)
}

private fun checkAcknowledgementAppTerms(): Boolean {
return mmkv.getBoolean(DawnConstants.ACKNOWLEDGE_APP_PRIVACY_TERMS, false)
}

fun acknowledgementAppTerms() {
mmkv.putBoolean(DawnConstants.ACKNOWLEDGE_APP_PRIVACY_TERMS, true)
}

suspend fun getAppPrivacyTerms(): String? {
return if (checkAcknowledgementAppTerms()) null
else webService.getPrivacyAgreement().run {
if (this is APIMessageResponse.Success) {
dom!!.toString()
} else {
Timber.d(message)
""
}
}
}

suspend fun getLatestRelease(): Release? {
// TODO: add update check frequency
// val currentVersion = releaseDao.getLatestRelease()
Expand Down
Loading

0 comments on commit f326e7d

Please sign in to comment.