diff options
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/stack')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java | 5 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackViewModel.java | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java index 33925a8f5..6e328b7d7 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackFragment.java @@ -20,6 +20,7 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.nextcloud.android.common.ui.theme.utils.ColorRole; +import com.nextcloud.android.sso.api.EmptyResponse; import it.niedermann.android.crosstabdnd.DragAndDropTab; import it.niedermann.android.reactivelivedata.ReactiveLiveData; @@ -170,7 +171,7 @@ public class StackFragment extends Fragment implements Themed, DragAndDropTab<Ca public void move(long originAccountId, long originCardLocalId, long targetAccountId, long targetBoardLocalId, long targetStackLocalId) { stackViewModel.moveCard(originAccountId, originCardLocalId, targetAccountId, targetBoardLocalId, targetStackLocalId, new IResponseCallback<>() { @Override - public void onResponse(Void response) { + public void onResponse(EmptyResponse response) { DeckLog.log("Moved", Card.class.getSimpleName(), originCardLocalId, "to", Stack.class.getSimpleName(), targetStackLocalId); } @@ -228,7 +229,7 @@ public class StackFragment extends Fragment implements Themed, DragAndDropTab<Ca public void onDelete(@NonNull FullCard fullCard) { stackViewModel.deleteCard(fullCard.getCard(), new IResponseCallback<>() { @Override - public void onResponse(Void response) { + public void onResponse(EmptyResponse response) { DeckLog.info("Successfully deleted card", fullCard.getCard().getTitle()); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackViewModel.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackViewModel.java index c6746449c..d7fdb3364 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackViewModel.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/stack/StackViewModel.java @@ -8,6 +8,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.lifecycle.LiveData; +import com.nextcloud.android.sso.api.EmptyResponse; import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException; import java.util.List; @@ -29,7 +30,7 @@ public class StackViewModel extends SyncViewModel { super(application, account); } - public void moveCard(long originAccountId, long originCardLocalId, long targetAccountId, long targetBoardLocalId, long targetStackLocalId, @NonNull IResponseCallback<Void> callback) { + public void moveCard(long originAccountId, long originCardLocalId, long targetAccountId, long targetBoardLocalId, long targetStackLocalId, @NonNull IResponseCallback<EmptyResponse> callback) { syncRepository.moveCard(originAccountId, originCardLocalId, targetAccountId, targetBoardLocalId, targetStackLocalId, callback); } @@ -69,7 +70,7 @@ public class StackViewModel extends SyncViewModel { } - public void deleteCard(@NonNull Card card, @NonNull IResponseCallback<Void> callback) { + public void deleteCard(@NonNull Card card, @NonNull IResponseCallback<EmptyResponse> callback) { syncRepository.deleteCard(card, callback); } |