fixed templates backup importing duplicates
This commit is contained in:
parent
8a605c61ad
commit
2c026f039e
6 changed files with 48 additions and 8 deletions
|
|
@ -126,7 +126,7 @@ dependencies {
|
|||
|
||||
implementation "androidx.appcompat:appcompat:$appCompatVer"
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
||||
implementation 'com.google.android.material:material:1.7.0'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.core:core:1.9.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
|
|
|
|||
38
app/proguard-rules.pro
vendored
38
app/proguard-rules.pro
vendored
|
|
@ -19,3 +19,41 @@
|
|||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-if @kotlinx.serialization.Serializable class **
|
||||
-keepclassmembers class <1> {
|
||||
static <1>$Companion Companion;
|
||||
}
|
||||
|
||||
# Keep `serializer()` on companion objects (both default and named) of serializable classes.
|
||||
-if @kotlinx.serialization.Serializable class ** {
|
||||
static **$* *;
|
||||
}
|
||||
-keepclassmembers class <2>$<3> {
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# Keep `INSTANCE.serializer()` of serializable objects.
|
||||
-if @kotlinx.serialization.Serializable class ** {
|
||||
public static ** INSTANCE;
|
||||
}
|
||||
-keepclassmembers class <1> {
|
||||
public static <1> INSTANCE;
|
||||
kotlinx.serialization.KSerializer serializer(...);
|
||||
}
|
||||
|
||||
# @Serializable and @Polymorphic are used at runtime for polymorphic serialization.
|
||||
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault
|
||||
|
||||
# Serializer for classes with named companion objects are retrieved using `getDeclaredClasses`.
|
||||
# If you have any, uncomment and replace classes with those containing named companion objects.
|
||||
#-keepattributes InnerClasses # Needed for `getDeclaredClasses`.
|
||||
#-if @kotlinx.serialization.Serializable class
|
||||
#com.example.myapplication.HasNamedCompanion, # <-- List serializable classes with named companions.
|
||||
#com.example.myapplication.HasNamedCompanion2
|
||||
#{
|
||||
# static **$* *;
|
||||
#}
|
||||
#-keepnames class <1>$$serializer { # -keepnames suffices; class is kept when serializer() is kept.
|
||||
# static <1>$$serializer INSTANCE;
|
||||
#}
|
||||
-keepclassmembers enum * { *; }
|
||||
|
|
@ -79,8 +79,8 @@ class CommandTemplateViewModel(private val application: Application) : AndroidVi
|
|||
val clip = clipboard.primaryClip!!.getItemAt(0).text.toString()
|
||||
try{
|
||||
jsonFormat.decodeFromString<CommandTemplateExport>(clip).run {
|
||||
templates.filterNot {
|
||||
allTemplates.contains(it)
|
||||
templates.filterNot {t ->
|
||||
allTemplates.find { it.content == t.content} != null
|
||||
}.run {
|
||||
this.forEach {
|
||||
repository.insert(it.copy(id=0))
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@ class SelectPlaylistItemsBottomSheetDialog(private val items: List<ResultItem>,
|
|||
val downloadItems = mutableListOf<DownloadItem>()
|
||||
checkedResultItems.forEach {c ->
|
||||
val i = downloadViewModel.createDownloadItemFromResult(c,type)
|
||||
i.format = downloadViewModel.getLatestCommandTemplateAsFormat()
|
||||
if (type == DownloadViewModel.Type.command){
|
||||
i.format = downloadViewModel.getLatestCommandTemplateAsFormat()
|
||||
}
|
||||
downloadItems.add(i)
|
||||
}
|
||||
if (downloadItems.size == 1){
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ buildscript {
|
|||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '7.4.1' apply false
|
||||
id 'com.android.library' version '7.4.1' apply false
|
||||
id 'com.android.application' version '7.4.2' apply false
|
||||
id 'com.android.library' version '7.4.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
|
||||
id "org.jetbrains.kotlin.plugin.serialization" version "1.7.21" apply false
|
||||
}
|
||||
|
|
|
|||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#Tue Jan 03 22:34:47 CET 2023
|
||||
#Sun Mar 05 19:03:41 CET 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
Loading…
Reference in a new issue