Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
This commit is contained in:
rapterjet2004 2024-10-23 08:26:44 -05:00
parent d464d714ff
commit 3d9f8366c8
No known key found for this signature in database
GPG key ID: 3AA5FDFED7944099
4 changed files with 7 additions and 12 deletions

View file

@ -112,14 +112,8 @@ interface NcApiCoroutines {
suspend fun deleteConversationAvatar(@Header("Authorization") authorization: String, @Url url: String): RoomOverall suspend fun deleteConversationAvatar(@Header("Authorization") authorization: String, @Url url: String): RoomOverall
@POST @POST
suspend fun archiveConversation( suspend fun archiveConversation(@Header("Authorization") authorization: String, @Url url: String): GenericOverall
@Header("Authorization") authorization: String?,
@Url url: String?
): GenericOverall
@DELETE @DELETE
suspend fun unarchiveConversation( suspend fun unarchiveConversation(@Header("Authorization") authorization: String, @Url url: String): GenericOverall
@Header("Authorization") authorization: String?,
@Url url: String?
): GenericOverall
} }

View file

@ -751,7 +751,8 @@ class ConversationInfoActivity :
this.lifecycleScope.launch { this.lifecycleScope.launch {
if (conversation!!.hasArchived) { if (conversation!!.hasArchived) {
viewModel.unarchiveConversation(conversationUser, conversationToken) viewModel.unarchiveConversation(conversationUser, conversationToken)
binding.archiveConversationIcon.setImageDrawable(resources.getDrawable(R.drawable.outline_archive_24)) binding.archiveConversationIcon
.setImageDrawable(resources.getDrawable(R.drawable.outline_archive_24))
binding.archiveConversationText.text = resources.getString(R.string.archive_conversation) binding.archiveConversationText.text = resources.getString(R.string.archive_conversation)
binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint) binding.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
} else { } else {

View file

@ -71,8 +71,9 @@ class RepositoryModule {
@Provides @Provides
fun provideConversationsRepository( fun provideConversationsRepository(
ncApi: NcApi, ncApiCoroutines: NcApiCoroutines, userProvider: ncApi: NcApi,
CurrentUserProviderNew ncApiCoroutines: NcApiCoroutines,
userProvider: CurrentUserProviderNew
): ConversationsRepository { ): ConversationsRepository {
return ConversationsRepositoryImpl(ncApi, ncApiCoroutines, userProvider) return ConversationsRepositoryImpl(ncApi, ncApiCoroutines, userProvider)
} }

View file

@ -246,7 +246,6 @@ object Migrations {
} }
fun addArchiveConversations(db: SupportSQLiteDatabase) { fun addArchiveConversations(db: SupportSQLiteDatabase) {
try { try {
db.execSQL( db.execSQL(
"ALTER TABLE Conversations " + "ALTER TABLE Conversations " +