Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new conversation #4064

Merged
merged 23 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cd01c80
ConversationCreationActivity UI
sowjanyakch May 22, 2024
d32bc74
ConversationCreationActivity - Refactoring
sowjanyakch Aug 5, 2024
9f61793
add isAddParticipant flag
sowjanyakch Aug 6, 2024
b5f7556
don't create room on clicking contacts when creating a new conversation
sowjanyakch Aug 8, 2024
e57c13e
MultiSelect contacts
sowjanyakch Aug 12, 2024
0913b16
add participants endpoint
sowjanyakch Aug 13, 2024
9ae0d52
update ContactsViewModelTest - shareTypes
sowjanyakch Aug 13, 2024
6a01309
add participants
sowjanyakch Aug 14, 2024
6d0144d
add participants list
sowjanyakch Aug 16, 2024
6b82d72
Start ContactsActivity to edit participants
sowjanyakch Aug 19, 2024
2959d8e
Create public conversation
sowjanyakch Aug 20, 2024
3db1f72
Created a public conversation
sowjanyakch Aug 21, 2024
dba56dd
Solved error unable to create call adapter for GenericOverall
sowjanyakch Aug 23, 2024
cb6fdf6
Refactor createRoom()
sowjanyakch Aug 27, 2024
1187b41
Set password
sowjanyakch Aug 28, 2024
5f3d73e
make conversation available for registered users and guest app users
sowjanyakch Aug 29, 2024
ff63bcd
Properly select and deselect contact items
sowjanyakch Sep 2, 2024
5237832
Work on warnings
sowjanyakch Sep 3, 2024
ecb3d53
Ktlint Format
sowjanyakch Sep 3, 2024
8d1d446
only set password if not empty
mahibi Sep 4, 2024
8a59dd9
fix to align Participants header
mahibi Sep 4, 2024
5001fd0
colorize status bar
mahibi Sep 4, 2024
2fbe3db
change wording for visibility of new conversation
mahibi Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ dependencies {
//compose
implementation(platform("androidx.compose:compose-bom:2024.09.00"))
implementation("androidx.compose.ui:ui")
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3:material3:1.2.1'
implementation("androidx.compose.ui:ui-tooling-preview")
implementation 'androidx.activity:activity-compose:1.9.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5'
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
<activity android:name=".contacts.ContactsActivityCompose"
android:theme="@style/AppTheme"/>

<activity android:name=".conversationcreation.ConversationCreationActivity"
android:theme="@style/AppTheme"/>

<activity
android:name=".account.AccountVerificationActivity"
android:theme="@style/AppTheme" />
Expand Down
57 changes: 57 additions & 0 deletions app/src/main/java/com/nextcloud/talk/api/NcApiCoroutines.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ package com.nextcloud.talk.api

import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall
import com.nextcloud.talk.models.json.conversations.RoomOverall
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.models.json.participants.AddParticipantOverall
import retrofit2.http.DELETE
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query
import retrofit2.http.QueryMap
import retrofit2.http.Url
Expand Down Expand Up @@ -39,4 +45,55 @@ interface NcApiCoroutines {
@Url url: String?,
@QueryMap options: Map<String, String>?
): RoomOverall

/*
QueryMap items are as follows:
- "roomName" : "newName"

Server URL is: baseUrl + ocsApiVersion + spreedApiVersion + /room/roomToken
*/
@FormUrlEncoded
@PUT
suspend fun renameRoom(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("roomName") roomName: String?
): GenericOverall

@FormUrlEncoded
@PUT
suspend fun openConversation(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("scope") scope: Int
): GenericOverall

@FormUrlEncoded
@PUT
suspend fun setConversationDescription(
@Header("Authorization") authorization: String?,
@Url url: String,
@Field("description") description: String?
): GenericOverall

@POST
suspend fun addParticipant(
@Header("Authorization") authorization: String?,
@Url url: String?,
@QueryMap options: Map<String, String>?
): AddParticipantOverall

@POST
suspend fun makeRoomPublic(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall

@DELETE
suspend fun makeRoomPrivate(@Header("Authorization") authorization: String?, @Url url: String): GenericOverall

@FormUrlEncoded
@PUT
suspend fun setPassword(
@Header("Authorization") authorization: String?,
@Url url: String?,
@Field("password") password: String?
): GenericOverall
}
Loading
Loading