diff --git a/.gradle/7.3.3/checksums/checksums.lock b/.gradle/7.3.3/checksums/checksums.lock index a6d42d4..6fd303d 100644 Binary files a/.gradle/7.3.3/checksums/checksums.lock and b/.gradle/7.3.3/checksums/checksums.lock differ diff --git a/.gradle/7.3.3/checksums/md5-checksums.bin b/.gradle/7.3.3/checksums/md5-checksums.bin index 8e8fa8e..237c42c 100644 Binary files a/.gradle/7.3.3/checksums/md5-checksums.bin and b/.gradle/7.3.3/checksums/md5-checksums.bin differ diff --git a/.gradle/7.3.3/checksums/sha1-checksums.bin b/.gradle/7.3.3/checksums/sha1-checksums.bin index c73947a..dc2b25e 100644 Binary files a/.gradle/7.3.3/checksums/sha1-checksums.bin and b/.gradle/7.3.3/checksums/sha1-checksums.bin differ diff --git a/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock index 9202812..1e0586a 100644 Binary files a/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock and b/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock differ diff --git a/.gradle/7.3.3/executionHistory/executionHistory.bin b/.gradle/7.3.3/executionHistory/executionHistory.bin index b45f6d7..9434615 100644 Binary files a/.gradle/7.3.3/executionHistory/executionHistory.bin and b/.gradle/7.3.3/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.3.3/executionHistory/executionHistory.lock b/.gradle/7.3.3/executionHistory/executionHistory.lock index 39e9eff..212c280 100644 Binary files a/.gradle/7.3.3/executionHistory/executionHistory.lock and b/.gradle/7.3.3/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.3.3/fileHashes/fileHashes.bin b/.gradle/7.3.3/fileHashes/fileHashes.bin index a273a49..979d461 100644 Binary files a/.gradle/7.3.3/fileHashes/fileHashes.bin and b/.gradle/7.3.3/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.3.3/fileHashes/fileHashes.lock b/.gradle/7.3.3/fileHashes/fileHashes.lock index b033693..e6513ea 100644 Binary files a/.gradle/7.3.3/fileHashes/fileHashes.lock and b/.gradle/7.3.3/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.3.3/fileHashes/resourceHashesCache.bin b/.gradle/7.3.3/fileHashes/resourceHashesCache.bin index 34db847..4c8770a 100644 Binary files a/.gradle/7.3.3/fileHashes/resourceHashesCache.bin and b/.gradle/7.3.3/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index a419556..3e5cf1e 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties index c2e15ce..5884b89 100644 --- a/.gradle/buildOutputCleanup/cache.properties +++ b/.gradle/buildOutputCleanup/cache.properties @@ -1,2 +1,2 @@ -#Fri May 13 19:30:42 CST 2022 +#Tue Jan 10 20:51:24 CST 2023 gradle.version=7.3.3 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 5f6748c..404e2de 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock deleted file mode 100644 index 875c58a..0000000 Binary files a/.gradle/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin deleted file mode 100644 index 5bf31a4..0000000 Binary files a/.gradle/checksums/md5-checksums.bin and /dev/null differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin deleted file mode 100644 index a49754c..0000000 Binary files a/.gradle/checksums/sha1-checksums.bin and /dev/null differ diff --git a/.gradle/configuration-cache/gc.properties b/.gradle/configuration-cache/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index f0f9d11..98dba26 100644 Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ diff --git a/.gradle/workspace-id.txt b/.gradle/workspace-id.txt deleted file mode 100644 index 8f2ec60..0000000 Binary files a/.gradle/workspace-id.txt and /dev/null differ diff --git a/.gradle/workspace-id.txt.lock b/.gradle/workspace-id.txt.lock deleted file mode 100644 index ffe383d..0000000 Binary files a/.gradle/workspace-id.txt.lock and /dev/null differ diff --git a/app/build.gradle b/app/build.gradle index c04fd81..9896bdf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,10 @@ plugins { id 'kotlin-android' // id "androidx.navigation.safeargs.kotlin" id 'kotlin-kapt' + id 'com.google.gms.google-services' + id 'com.google.firebase.firebase-perf' + id 'com.google.firebase.crashlytics' + } android { @@ -68,6 +72,11 @@ android { dependencies { + implementation platform('com.google.firebase:firebase-bom:31.1.1') + implementation 'com.google.firebase:firebase-analytics-ktx' + implementation 'com.google.firebase:firebase-crashlytics-ktx' + implementation 'com.google.firebase:firebase-perf-ktx' + def nav_version = "2.5.1" // implementation 'com.luolc:emoji-rain:0.1.1' diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 0000000..2846641 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "787078274450", + "project_id": "rust-assistant-58ca5", + "storage_bucket": "rust-assistant-58ca5.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:787078274450:android:e5a88cb9c74737a9b6754b", + "android_client_info": { + "package_name": "com.coldmint.rust.pro" + } + }, + "oauth_client": [ + { + "client_id": "787078274450-uv7cj6beui62h4qpfqson6skek06u5sk.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyA5b4_azY4PMSnHDF3Qsu0cFwsFhWT413M" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "787078274450-uv7cj6beui62h4qpfqson6skek06u5sk.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/app/src/main/java/com/coldmint/rust/pro/MainActivity.kt b/app/src/main/java/com/coldmint/rust/pro/MainActivity.kt index a3cfde9..d3b284a 100644 --- a/app/src/main/java/com/coldmint/rust/pro/MainActivity.kt +++ b/app/src/main/java/com/coldmint/rust/pro/MainActivity.kt @@ -12,6 +12,7 @@ import com.google.android.material.snackbar.Snackbar import android.os.* import android.util.Log import android.view.* +import android.widget.Toast import androidx.appcompat.app.ActionBarDrawerToggle import androidx.appcompat.widget.Toolbar import androidx.coordinatorlayout.widget.CoordinatorLayout @@ -148,7 +149,7 @@ class MainActivity : BaseActivity() { */ fun ifNeedShowUpdate(data: AppUpdateData.Data) { val key = "应用更新" - if (ServerConfiguration.isTestServer()){ + if (ServerConfiguration.isTestServer()) { Log.w(key, "当前为本地测试服务器,已禁用更新检查。") return } @@ -634,7 +635,6 @@ class MainActivity : BaseActivity() { */ fun observeStartViewModel() { startViewModel.userLiveData.observe(this) { - headLayout.nameView.text = it.data.userName headLayout.emailView.text = it.data.email val headIcon = it.data.headIcon @@ -644,7 +644,7 @@ class MainActivity : BaseActivity() { .into(headLayout.imageView) } val account = it.data.account - headLayout.root.setOnClickListener { + headLayout.imageView.setOnClickListener { val opIntent = Intent(this, UserHomePageActivity::class.java) opIntent.putExtra("userId", account) startActivity(opIntent) @@ -653,17 +653,19 @@ class MainActivity : BaseActivity() { startViewModel.needLoginLiveData.observe(this) { if (it) { - CoreDialog(this).setTitle(R.string.login).setMessage(R.string.login_tip) - .setPositiveButton(R.string.login) { - startActivity( - Intent( - this, - LoginActivity::class.java - ) + Glide.with(this).load(R.drawable.head_icon) + .apply(GlobalMethod.getRequestOptions(true, grayscale = false)) + .into(headLayout.imageView) + headLayout.nameView.text = getString(R.string.click_profile_picture_login) + headLayout.emailView.text = "" + headLayout.imageView.setOnClickListener { + startActivity( + Intent( + this, + LoginActivity::class.java ) - }.setNegativeButton(R.string.dialog_close) { - finish() - }.setCancelable(false).show() + ) + } } else { showGameConfiguredDialog() } diff --git a/app/src/main/java/com/coldmint/rust/pro/viewmodel/TemplateParserViewModel.kt b/app/src/main/java/com/coldmint/rust/pro/viewmodel/TemplateParserViewModel.kt index 60259a9..105dd24 100644 --- a/app/src/main/java/com/coldmint/rust/pro/viewmodel/TemplateParserViewModel.kt +++ b/app/src/main/java/com/coldmint/rust/pro/viewmodel/TemplateParserViewModel.kt @@ -96,12 +96,14 @@ class TemplateParserViewModel : BaseViewModel() { createDirectory } Log.d("构建文件", "是否需要独立创建文件夹${independentFolder} 文件夹目录${createPath}") - val folder = File(createPath) - if (folder.exists()) { - Log.e("构建文件", "创建目录${createPath}已存在。") - return false + if (independentFolder){ + val folder = File(createPath) + if (folder.exists()) { + Log.e("构建文件", "创建目录${createPath}已存在。") + return false + } + folder.mkdirs() } - folder.mkdirs() val path = File( createPath + "/" + if (index > -1) { fileName diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml index 3a7ce56..ee2878c 100644 --- a/app/src/main/res/layout/fragment_map.xml +++ b/app/src/main/res/layout/fragment_map.xml @@ -22,11 +22,11 @@ diff --git a/app/src/main/res/layout/fragment_mod.xml b/app/src/main/res/layout/fragment_mod.xml index f94c549..6d517eb 100644 --- a/app/src/main/res/layout/fragment_mod.xml +++ b/app/src/main/res/layout/fragment_mod.xml @@ -23,7 +23,7 @@ + android:text="@string/click_profile_picture_login"/> + android:text="" /> 要重新审核%1$s嘛? 重新审核 仓库 - 没有找到地图 + 没有地图 删除 MapFolder 地图目录 @@ -940,5 +940,6 @@ 投币数 单位数 更新次数 + 点击头像登录 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 838120d..3f284d4 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,9 @@ buildscript { classpath 'com.android.tools.build:gradle:7.2.0' // classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5" classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.0' + classpath 'com.google.gms:google-services:4.3.14' + classpath 'com.google.firebase:perf-plugin:1.4.2' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files