Skip to content

Commit 8ff2c81

Browse files
committed
use remote id
Signed-off-by: alperozturk <[email protected]>
1 parent ee24bca commit 8ff2c81

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ public Note getNoteById(long id) {
355355
return db.getNoteDao().getNoteById(id);
356356
}
357357

358+
public Note getNoteByRemoteId(long id) {
359+
return db.getNoteDao().getNoteByRemoteId(id);
360+
}
361+
358362
public LiveData<Integer> count$(long accountId) {
359363
return db.getNoteDao().count$(accountId);
360364
}

app/src/main/java/it/niedermann/owncloud/notes/persistence/dao/NoteDao.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public interface NoteDao {
5353
@Query(getNoteById)
5454
Note getNoteById(long id);
5555

56+
@Query("SELECT * FROM NOTE WHERE remoteId = :id")
57+
Note getNoteByRemoteId(long id);
58+
5659
@Query("SELECT remoteId FROM NOTE WHERE id = :id")
5760
Long getRemoteId(long id);
5861

0 commit comments

Comments
 (0)