diff options
author | desperateCoder <echotodevnull@gmail.com> | 2020-12-13 19:33:24 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2020-12-13 19:33:24 +0300 |
commit | 973ecc7088a22732237b8f72266f578c6366b6d7 (patch) | |
tree | ae9b1ab25df506d9a3cce065a1dc8a07aef59474 | |
parent | c6fe0423db5f6300309fed74667938c3d0e4ce46 (diff) |
#597 because android sucks
5 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java index 49cde67f7..3d2441990 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/SyncManager.java @@ -1962,7 +1962,7 @@ public class SyncManager { }); } @AnyThread - public void getFilterWidget(@NonNull Long filterWidgetId, @NonNull IResponseCallback<FilterWidget> callback) { + public void getFilterWidget(@NonNull Integer filterWidgetId, @NonNull IResponseCallback<FilterWidget> callback) { doAsync(() -> { try { callback.onResponse(dataBaseAdapter.getFilterWidgetByIdDirectly(filterWidgetId)); @@ -1985,7 +1985,7 @@ public class SyncManager { } @AnyThread - public void getCardsForFilterWidget(@NonNull Long filterWidgetId, @NonNull IResponseCallback<List<FilterWidgetCard>> callback) { + public void getCardsForFilterWidget(@NonNull Integer filterWidgetId, @NonNull IResponseCallback<List<FilterWidgetCard>> callback) { doAsync(() -> { try { callback.onResponse(dataBaseAdapter.getCardsForFilterWidget(filterWidgetId)); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java index 22ebc7244..0966ae6a7 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java @@ -1082,7 +1082,7 @@ public class DataBaseAdapter { public Long createFilterWidgetDirectly(FilterWidget filterWidget) { long widgetId = db.getFilterWidgetDao().insert(filterWidget); - filterWidget.setId(widgetId); + filterWidget.setId((int)widgetId); insertFilterWidgetDecendants(filterWidget); return widgetId; } @@ -1126,7 +1126,7 @@ public class DataBaseAdapter { insertFilterWidgetDecendants(filterWidget); } - public FilterWidget getFilterWidgetByIdDirectly(Long filterWidgetId) { + public FilterWidget getFilterWidgetByIdDirectly(Integer filterWidgetId) { FilterWidget filterWidget = db.getFilterWidgetDao().getFilterWidgetByIdDirectly(filterWidgetId); filterWidget.setSorts(db.getFilterWidgetSortDao().getFilterWidgetSortByFilterWidgetIdDirectly(filterWidgetId)); filterWidget.setAccounts(db.getFilterWidgetAccountDao().getFilterWidgetAccountsByFilterWidgetIdDirectly(filterWidgetId)); @@ -1142,7 +1142,7 @@ public class DataBaseAdapter { return filterWidget; } - public List<FilterWidgetCard> getCardsForFilterWidget(Long filterWidgetId) { + public List<FilterWidgetCard> getCardsForFilterWidget(Integer filterWidgetId) { FilterWidget filterWidget = getFilterWidgetByIdDirectly(filterWidgetId); FilterInformation filter = new FilterInformation(); List<FullCard> cardsResult = new ArrayList<>(); diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetAccountDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetAccountDao.java index 845deba44..9133aa4bc 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetAccountDao.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetAccountDao.java @@ -11,8 +11,8 @@ import it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.GenericDao; @Dao public interface FilterWidgetAccountDao extends GenericDao<FilterWidgetAccount> { @Query("DELETE FROM FilterWidgetAccount WHERE filterWidgetId = :filterWidgetId") - void deleteByFilterWidgetId (Long filterWidgetId); + void deleteByFilterWidgetId (Integer filterWidgetId); @Query("select * FROM FilterWidgetAccount WHERE filterWidgetId = :filterWidgetId") - List<FilterWidgetAccount> getFilterWidgetAccountsByFilterWidgetIdDirectly(Long filterWidgetId); + List<FilterWidgetAccount> getFilterWidgetAccountsByFilterWidgetIdDirectly(Integer filterWidgetId); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetDao.java index e63250047..69be2b863 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetDao.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetDao.java @@ -12,5 +12,5 @@ public interface FilterWidgetDao extends GenericDao<FilterWidget> { void delete (Long filterWidgetId); @Query("SELECT * FROM FilterWidget where id = :filterWidgetId") - FilterWidget getFilterWidgetByIdDirectly(Long filterWidgetId); + FilterWidget getFilterWidgetByIdDirectly(Integer filterWidgetId); } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetSortDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetSortDao.java index 526943050..6aa86a4a3 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetSortDao.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/widgets/filter/FilterWidgetSortDao.java @@ -11,8 +11,8 @@ import it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao.GenericDao; @Dao public interface FilterWidgetSortDao extends GenericDao<FilterWidgetSort> { @Query("DELETE FROM FilterWidgetSort WHERE filterWidgetId = :filterWidgetId") - void deleteByFilterWidgetId (Long filterWidgetId); + void deleteByFilterWidgetId (Integer filterWidgetId); @Query("select * FROM FilterWidgetSort WHERE filterWidgetId = :filterWidgetId order by ruleOrder asc") - List<FilterWidgetSort> getFilterWidgetSortByFilterWidgetIdDirectly(Long filterWidgetId); + List<FilterWidgetSort> getFilterWidgetSortByFilterWidgetIdDirectly(Integer filterWidgetId); } |