Skip to content

Commit b97b180

Browse files
Merge pull request #2207 from nextcloud/backport/2206/stable-4.3
[stable-4.3] fix: Move to EmptyResponse instead off now unsupported Void
2 parents 9d3e467 + e502853 commit b97b180

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import androidx.annotation.Nullable;
1313

1414
import com.google.gson.annotations.Expose;
15+
import com.nextcloud.android.sso.api.EmptyResponse;
1516
import com.nextcloud.android.sso.api.NextcloudAPI;
1617
import com.nextcloud.android.sso.api.ParsedResponse;
1718

@@ -119,7 +120,7 @@ public Call<Note> editNote(@NonNull Note note) {
119120
}
120121
}
121122

122-
public Call<Void> deleteNote(long noteId) {
123+
public Call<EmptyResponse> deleteNote(long noteId) {
123124
if (ApiVersion.API_VERSION_1_0.equals(usedApiVersion)) {
124125
return notesAPI_1_0.deleteNote(noteId);
125126
} else if (ApiVersion.API_VERSION_0_2.equals(usedApiVersion)) {

app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI_0_2.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package it.niedermann.owncloud.notes.persistence.sync;
88

9+
import com.nextcloud.android.sso.api.EmptyResponse;
910
import com.nextcloud.android.sso.api.ParsedResponse;
1011

1112
import java.util.List;
@@ -43,5 +44,5 @@ public interface NotesAPI_0_2 {
4344
Call<Note> editNote(@Body NotesAPI.Note_0_2 note, @Path("remoteId") long remoteId);
4445

4546
@DELETE("notes/{remoteId}")
46-
Call<Void> deleteNote(@Path("remoteId") long noteId);
47+
Call<EmptyResponse> deleteNote(@Path("remoteId") long noteId);
4748
}

app/src/main/java/it/niedermann/owncloud/notes/persistence/sync/NotesAPI_1_0.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package it.niedermann.owncloud.notes.persistence.sync;
88

9+
import com.nextcloud.android.sso.api.EmptyResponse;
910
import com.nextcloud.android.sso.api.ParsedResponse;
1011

1112
import java.util.List;
@@ -44,7 +45,7 @@ public interface NotesAPI_1_0 {
4445
Call<Note> editNote(@Body Note note, @Path("remoteId") long remoteId);
4546

4647
@DELETE("notes/{remoteId}")
47-
Call<Void> deleteNote(@Path("remoteId") long noteId);
48+
Call<EmptyResponse> deleteNote(@Path("remoteId") long noteId);
4849

4950
@GET("settings")
5051
Call<NotesSettings> getSettings();

0 commit comments

Comments
 (0)