Foreign key constraints are not active during migration.
At least db.execSQL("PRAGMA foreign_keys=ON;") etc did not help.
Because of this it is not enough to just clear the Conversations table (to have cascade deletion in
other tables), but all related tables have to be cleared with SQL statement as well.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
for now only added logic in IncomingTextMessageViewHolder.kt ...
- add thread button for quoted messages if thread of message != current thread
- open a new ChatActivity when clicked the button and pass threadId
- change the title
- add todos
for now, the parentId was taken instead of topmostParentId (which is not available yet)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
by replacing
net.zetetic:android-database-sqlcipher
with
net.zetetic:sqlcipher-android
which should hopefully solve the error
Exception java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~HfdEzwuB9IXXVa0Fvds_Kw==/com.nextcloud.talk2-yCC7T_sy5lQWb9w17SZlVQ==/base.apk!/lib/arm64-v8a/libsqlcipher.so" (new hash type from the future?)
at java.lang.Runtime.loadLibrary0 (Runtime.java:1081)
at java.lang.Runtime.loadLibrary0 (Runtime.java:1003)
at java.lang.System.loadLibrary (System.java:1765)
at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries (SQLiteDatabase.java:230)
at net.sqlcipher.database.SQLiteDatabase.loadLibs (SQLiteDatabase.java:247)
at net.sqlcipher.database.SQLiteDatabase.loadLibs (SQLiteDatabase.java:226)
at net.sqlcipher.database.SQLiteDatabase.loadLibs (SQLiteDatabase.java:219)
at net.sqlcipher.database.SupportHelper.<init> (SupportHelper.java:31)
at net.sqlcipher.database.SupportFactory.create (SupportFactory.java:43)
at androidx.room.RoomConnectionManager.<init> (RoomConnectionManager.android.kt:68)
at androidx.room.RoomDatabase.createConnectionManager$room_runtime_release (RoomDatabase.android.kt:318)
at androidx.room.RoomDatabase.init (RoomDatabase.android.kt:229)
at androidx.room.RoomDatabase$Builder.build (RoomDatabase.android.kt:1769)
at com.nextcloud.talk.data.source.local.TalkDatabase$Companion.build (TalkDatabase.kt:136)
at com.nextcloud.talk.data.source.local.TalkDatabase$Companion.getInstance (TalkDatabase.kt:89)
at com.nextcloud.talk.data.source.local.TalkDatabase.getInstance (Unknown Source:2)
at com.nextcloud.talk.dagger.modules.DatabaseModule.provideTalkDatabase (DatabaseModule.java:47)
at com.nextcloud.talk.dagger.modules.DatabaseModule_ProvideTalkDatabaseFactory.provideTalkDatabase (DatabaseModule_ProvideTalkDatabaseFactory.java:56)
at com.nextcloud.talk.dagger.modules.DatabaseModule_ProvideTalkDatabaseFactory.get (DatabaseModule_ProvideTalkDatabaseFactory.java:46)
at com.nextcloud.talk.dagger.modules.DatabaseModule_ProvideTalkDatabaseFactory.get (DatabaseModule_ProvideTalkDatabaseFactory.java:14)
at dagger.internal.DoubleCheck.getSynchronized (DoubleCheck.java:54)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:45)
at com.nextcloud.talk.dagger.modules.RepositoryModule_ProvideUsersRepositoryFactory.get (RepositoryModule_ProvideUsersRepositoryFactory.java:42)
at com.nextcloud.talk.dagger.modules.RepositoryModule_ProvideUsersRepositoryFactory.get (RepositoryModule_ProvideUsersRepositoryFactory.java:13)
at com.nextcloud.talk.utils.database.user.UserModule_Companion_ProvideUserManagerFactory.get (UserModule_Companion_ProvideUserManagerFactory.java:39)
at com.nextcloud.talk.utils.database.user.UserModule_Companion_ProvideUserManagerFactory.get (UserModule_Companion_ProvideUserManagerFactory.java:13)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideKeyManagerFactory.get (RestModule_ProvideKeyManagerFactory.java:46)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideKeyManagerFactory.get (RestModule_ProvideKeyManagerFactory.java:14)
at dagger.internal.DoubleCheck.getSynchronized (DoubleCheck.java:54)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:45)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideSslSocketFactoryCompatFactory.get (RestModule_ProvideSslSocketFactoryCompatFactory.java:46)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideSslSocketFactoryCompatFactory.get (RestModule_ProvideSslSocketFactoryCompatFactory.java:14)
at dagger.internal.DoubleCheck.getSynchronized (DoubleCheck.java:54)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:45)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideHttpClientFactory.get (RestModule_ProvideHttpClientFactory.java:69)
at com.nextcloud.talk.dagger.modules.RestModule_ProvideHttpClientFactory.get (RestModule_ProvideHttpClientFactory.java:19)
at dagger.internal.DoubleCheck.getSynchronized (DoubleCheck.java:54)
at dagger.internal.DoubleCheck.get (DoubleCheck.java:45)
at com.nextcloud.talk.application.DaggerNextcloudTalkApplicationComponent$NextcloudTalkApplicationComponentImpl.injectNextcloudTalkApplication (DaggerNextcloudTalkApplicationComponent.java:1629)
at com.nextcloud.talk.application.DaggerNextcloudTalkApplicationComponent$NextcloudTalkApplicationComponentImpl.inject (DaggerNextcloudTalkApplicationComponent.java:997)
at com.nextcloud.talk.application.NextcloudTalkApplication.onCreate (NextcloudTalkApplication.kt:147)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1386)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7504)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2416)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loopOnce (Looper.java:232)
at android.os.Looper.loop (Looper.java:317)
at android.app.ActivityThread.main (ActivityThread.java:8705)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:886)
which is reported in gplay console pre publish checks and blocks new releases
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
A contact (so not a conversation yet!) had the VIEW_TYPE 2131558677, but 2131558687 was expected to identify the type, see FlexibleViewType.kt
The checks in onItemClick are replaced to directly change the type via kotlin "is" method.
best solution for future: FlexibleAdapter should be removed!-> replace with Compose!
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>