Skip to content

Commit

Permalink
Fixed saveArrayToFile overwriting previous arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicEventHorizon committed Oct 18, 2023
1 parent c5e024a commit 215df55
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/src/main/java/com/pirouette/chibichat/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MainActivity : AppCompatActivity() {
val stopTokenArray: ArrayList<String> = ArrayList()
val subStringArray: ArrayList<String> = ArrayList()
var msgData = ArrayList<Message>()
val savedStoryData = ArrayList<SavedData>()
var savedStoryData = ArrayList<SavedData>()
var convArray = mutableListOf<String>()


Expand All @@ -52,6 +52,7 @@ class MainActivity : AppCompatActivity() {
recyclerview.layoutManager = LinearLayoutManager(this)
adapter = RvAdapter(msgData)
recyclerview.adapter = adapter
savedStoryData = loadArrayFromFile(this)
btnSend.setOnClickListener()
{
LoadData()
Expand Down Expand Up @@ -278,7 +279,6 @@ class MainActivity : AppCompatActivity() {
}
} catch (e: Exception) {
e.printStackTrace()
msgData.add(Message("System: " + e.toString(), 2))
ArrayList()
}
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
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 '8.0.0' apply false
id 'com.android.library' version '8.0.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.21' apply false
}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed May 31 18:53:53 AST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 215df55

Please sign in to comment.