Fix release build

This commit is contained in:
Koitharu
2022-03-16 18:46:53 +02:00
parent de176ec040
commit e6cd6617ba
3 changed files with 8 additions and 4 deletions

View File

@@ -14,8 +14,8 @@ android {
applicationId 'org.koitharu.kotatsu'
minSdkVersion 21
targetSdkVersion 31
versionCode 381
versionName '2.1.5'
versionCode 399
versionName '3.0-a0'
generatedDensities = []
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -1,5 +1,6 @@
package org.koitharu.kotatsu.settings
import android.content.ComponentName
import android.content.Intent
import android.content.SharedPreferences
import android.os.Bundle
@@ -13,7 +14,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceScreen
import androidx.preference.TwoStatePreference
import kotlinx.coroutines.launch
import leakcanary.LeakCanary
import org.koin.android.ext.android.inject
import org.koitharu.kotatsu.R
import org.koitharu.kotatsu.base.ui.BasePreferenceFragment
@@ -93,7 +93,10 @@ class MainSettingsFragment : BasePreferenceFragment(R.string.settings),
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.action_leaks -> {
startActivity(LeakCanary.newLeakDisplayActivityIntent())
val intent = Intent()
intent.component = ComponentName(requireContext(), "leakcanary.internal.activity.LeakActivity")
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
startActivity(intent)
true
}
else -> super.onOptionsItemSelected(item)

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<string name="app_name" translatable="false">Kotatsu</string>
<string name="close_menu">Close menu</string>
<string name="open_menu">Open menu</string>
<string name="local_storage">Local storage</string>