1.集成firebase。2.修复了独立文件夹选项关闭后,无法创建单位的问题。3.移除登录对话框,支持不登录查看模组。
This commit is contained in:
parent
0b4d6c9738
commit
cfc3188373
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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'
|
||||
|
|
39
app/google-services.json
Normal file
39
app/google-services.json
Normal file
|
@ -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"
|
||||
}
|
|
@ -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<ActivityMainBinding>() {
|
|||
*/
|
||||
fun ifNeedShowUpdate(data: AppUpdateData.Data) {
|
||||
val key = "应用更新"
|
||||
if (ServerConfiguration.isTestServer()){
|
||||
if (ServerConfiguration.isTestServer()) {
|
||||
Log.w(key, "当前为本地测试服务器,已禁用更新检查。")
|
||||
return
|
||||
}
|
||||
|
@ -634,7 +635,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
|||
*/
|
||||
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<ActivityMainBinding>() {
|
|||
.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<ActivityMainBinding>() {
|
|||
|
||||
startViewModel.needLoginLiveData.observe(this) {
|
||||
if (it) {
|
||||
CoreDialog(this).setTitle(R.string.login).setMessage(R.string.login_tip)
|
||||
.setPositiveButton(R.string.login) {
|
||||
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()
|
||||
}
|
||||
|
|
|
@ -96,12 +96,14 @@ class TemplateParserViewModel : BaseViewModel() {
|
|||
createDirectory
|
||||
}
|
||||
Log.d("构建文件", "是否需要独立创建文件夹${independentFolder} 文件夹目录${createPath}")
|
||||
if (independentFolder){
|
||||
val folder = File(createPath)
|
||||
if (folder.exists()) {
|
||||
Log.e("构建文件", "创建目录${createPath}已存在。")
|
||||
return false
|
||||
}
|
||||
folder.mkdirs()
|
||||
}
|
||||
val path = File(
|
||||
createPath + "/" + if (index > -1) {
|
||||
fileName
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/mapError"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/not_find_map"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/modError"
|
||||
style="@style/TextAppearance.Material3.TitleLarge"
|
||||
style="@style/TextAppearance.Material3.TitleSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/user_name" />
|
||||
android:text="@string/click_profile_picture_login"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/emailView"
|
||||
|
@ -30,7 +30,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="@string/email" />
|
||||
android:text="" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -686,7 +686,7 @@
|
|||
<string name="review_audit_mod_tip">要重新审核%1$s嘛?</string>
|
||||
<string name="review_audit">重新审核</string>
|
||||
<string name="warehouse">仓库</string>
|
||||
<string name="not_find_map">没有找到地图</string>
|
||||
<string name="not_find_map">没有地图</string>
|
||||
<string name="del_map">删除</string>
|
||||
<string name="setting_map_folder" translatable="false">MapFolder</string>
|
||||
<string name="map_folder">地图目录</string>
|
||||
|
@ -940,5 +940,6 @@
|
|||
<string name="coin_num">投币数</string>
|
||||
<string name="unit_number">单位数</string>
|
||||
<string name="update_number">更新次数</string>
|
||||
<string name="click_profile_picture_login">点击头像登录</string>
|
||||
|
||||
</resources>
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user