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
@POST
suspend fun archiveConversation(
@Header("Authorization") authorization: String?,
@Url url: String?
): GenericOverall
suspend fun archiveConversation(@Header("Authorization") authorization: String, @Url url: String): GenericOverall
@DELETE
suspend fun unarchiveConversation(
@Header("Authorization") authorization: String?,
@Url url: String?
): GenericOverall
suspend fun unarchiveConversation(@Header("Authorization") authorization: String, @Url url: String): GenericOverall
}

View file

@ -751,7 +751,8 @@ class ConversationInfoActivity :
this.lifecycleScope.launch {
if (conversation!!.hasArchived) {
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.archiveConversationTextHint.text = resources.getString(R.string.archive_hint)
} else {

View file

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

View file

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