Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public CompletableFuture<UUID> putTagInList(UUID todoListID, UUID tagId) {
.thenApply(JSONSerializer::serializeTodoList)
.thenApply(
serializedTodoList -> serializedTodoList.getBytes(StandardCharsets.UTF_8))
.thenCompose(bytes -> this.storageService.upload(bytes, listPath))
.thenCompose(bytes -> storageService.upload(bytes, listPath))
.thenApply(str -> tagId);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,6 @@ public LiveData<List<Tag>> getGlobalTags() {
return globalTags;
}

public LiveData<List<Tag>> getUnlinkedTags(UUID todoListID) {
setTagsLists(todoListID);
return unlinkedTags;
}

public void putTagInTodolist(UUID todoListID, UUID tagId) {
localDatabase
.putTagInList(todoListID, tagId)
Expand All @@ -262,9 +257,10 @@ public void putTagInTodolist(UUID todoListID, UUID tagId) {
.thenAccept(
str -> {
List<Tag> unlinked = globalTags.getValue();
unlinked.removeAll(globalTags.getValue());
unlinked.removeAll(localTags.getValue());
unlinkedTags.postValue(unlinked);
});
remoteDatabase.putTagInList(todoListID, tagId);
}

public void putTag(Tag tag) {
Expand Down Expand Up @@ -293,7 +289,7 @@ public void removeTagFromTodolist(UUID todoListID, UUID tagId) {
.thenAccept(
str -> {
List<Tag> unlinked = globalTags.getValue();
unlinked.removeAll(globalTags.getValue());
unlinked.removeAll(localTags.getValue());
unlinkedTags.postValue(unlinked);
});
}
Expand Down