diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/database/DataBaseAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/database/DataBaseAdapter.java index eaf14c6bb..a8aa90ed9 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/database/DataBaseAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/database/DataBaseAdapter.java @@ -484,8 +484,8 @@ public void deleteJoinedUserForCardPhysically(long localCardId, long localUserId db.getJoinCardWithUserDao().deleteByCardIdAndUserIdPhysically(localCardId, localUserId); } - public void deleteJoinedUsersForCardsInBoardPhysically(long localBoardId) { - db.getJoinCardWithUserDao().deleteJoinedUsersForCardsInBoardPhysically(localBoardId); + public void deleteJoinedUsersForCardsInBoardWithoutPermissionPhysically(long localBoardId) { + db.getJoinCardWithUserDao().deleteJoinedUsersForCardsInBoardWithoutPermissionPhysically(localBoardId); } public void createJoinCardWithUser(long localUserId, long localCardId) { diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/database/dao/JoinCardWithUserDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/database/dao/JoinCardWithUserDao.java index b3a9f76f3..ee613564d 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/database/dao/JoinCardWithUserDao.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/database/dao/JoinCardWithUserDao.java @@ -21,7 +21,7 @@ public interface JoinCardWithUserDao extends GenericDao { @Query("DELETE FROM joincardwithuser " + "WHERE cardid in (select c.localId from Card c join Stack s on c.stackId = s.localId and s.boardId = :localBoardId) " + "and userId not in (select userId from UserInBoard where boardId = :localBoardId)") - void deleteJoinedUsersForCardsInBoardPhysically(long localBoardId); + void deleteJoinedUsersForCardsInBoardWithoutPermissionPhysically(long localBoardId); @Query("select * FROM joincardwithuser WHERE cardId = :localCardId and userId = :localUserId") JoinCardWithUser getJoin(Long localUserId, Long localCardId); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/remote/helpers/providers/BoardDataProvider.java b/app/src/main/java/it/niedermann/nextcloud/deck/remote/helpers/providers/BoardDataProvider.java index de22fbd64..1f2658c55 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/remote/helpers/providers/BoardDataProvider.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/remote/helpers/providers/BoardDataProvider.java @@ -134,7 +134,7 @@ private void handleUsers(DataBaseAdapter dataBaseAdapter, long accountId, FullBo dataBaseAdapter.addUserToBoard(existing.getLocalId(), entity.getLocalId()); } } - dataBaseAdapter.deleteJoinedUsersForCardsInBoardPhysically(entity.getLocalId()); + dataBaseAdapter.deleteJoinedUsersForCardsInBoardWithoutPermissionPhysically(entity.getLocalId()); } private User createOrUpdateUser(DataBaseAdapter dataBaseAdapter, long accountId, User remoteUser) {