Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acb52161 authored by alperozturk's avatar alperozturk Committed by Andy Scherzinger
Browse files

check db status

parent c8c74fdc
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -546,16 +546,8 @@ public class NotesRepository {
            try {
                final var ssoAccount = AccountImporter.getSingleSignOnAccount(context, account.getAccountName());
                final var notesAPI = apiProvider.getNotesAPI(context, ssoAccount, getPreferredApiVersion(account.getApiVersion()));

                boolean newFavoriteValue = !note.getFavorite();
                DBStatus newDBStatus = DBStatus.VOID;

                if (newFavoriteValue) {
                    newDBStatus = DBStatus.LOCAL_EDITED;
                }

                note.setFavorite(newFavoriteValue);
                note.setStatus(newDBStatus);
                note.setFavorite(!note.getFavorite());
                note.setStatus(DBStatus.LOCAL_EDITED);
                final var result = notesAPI.updateNote(note);
                final var response = result.execute();
                if (response.isSuccessful()) {