From 22153beff230d7950d43614d98163649f2573da2 Mon Sep 17 00:00:00 2001 From: udhayarajan Date: Fri, 28 Jul 2023 00:27:18 +0530 Subject: [PATCH] feat: direct download. fix: Instagram Not working fix: Add pagination for HistoryFragment --- .idea/gradle.xml | 2 +- .idea/kotlinc.xml | 2 +- .idea/misc.xml | 3 + app/build.gradle | 47 ++--- app/proguard-rules.pro | 1 + .../com/mugames/vidsnap/database/History.java | 87 --------- .../com/mugames/vidsnap/database/History.kt | 92 +++++++++ .../{HistoryDao.java => HistoryDao.kt} | 34 ++-- .../vidsnap/database/HistoryDatabase.java | 134 ------------- .../vidsnap/database/HistoryDatabase.kt | 129 ++++++++++++ .../vidsnap/database/HistoryPagingSource.kt | 61 ++++++ .../vidsnap/database/HistoryRepository.java | 27 ++- .../mugames/vidsnap/network/Downloader.java | 4 + .../vidsnap/ui/activities/MainActivity.java | 9 +- .../adapters/HistoryRecyclerViewAdapter.java | 6 +- .../vidsnap/ui/fragments/HistoryFragment.java | 161 --------------- .../vidsnap/ui/fragments/HistoryFragment.kt | 184 ++++++++++++++++++ .../vidsnap/ui/fragments/VideoFragment.java | 36 +++- .../ui/viewmodels/HistoryViewModel.java | 95 --------- .../vidsnap/ui/viewmodels/HistoryViewModel.kt | 84 ++++++++ .../ui/viewmodels/VideoFragmentViewModel.java | 9 +- .../ui/viewmodels/VideoFragmentViewModelKt.kt | 32 +++ .../factory/HistoryViewModelFactory.kt | 48 +++++ .../vidsnap/utility/DownloadReceiver.java | 7 +- .../utility/bundles/DownloadDetails.java | 10 +- app/src/main/res/layout/fragment_history.xml | 12 +- build.gradle | 9 +- 27 files changed, 765 insertions(+), 560 deletions(-) delete mode 100644 app/src/main/java/com/mugames/vidsnap/database/History.java create mode 100644 app/src/main/java/com/mugames/vidsnap/database/History.kt rename app/src/main/java/com/mugames/vidsnap/database/{HistoryDao.java => HistoryDao.kt} (60%) delete mode 100644 app/src/main/java/com/mugames/vidsnap/database/HistoryDatabase.java create mode 100644 app/src/main/java/com/mugames/vidsnap/database/HistoryDatabase.kt create mode 100644 app/src/main/java/com/mugames/vidsnap/database/HistoryPagingSource.kt delete mode 100644 app/src/main/java/com/mugames/vidsnap/ui/fragments/HistoryFragment.java create mode 100644 app/src/main/java/com/mugames/vidsnap/ui/fragments/HistoryFragment.kt delete mode 100644 app/src/main/java/com/mugames/vidsnap/ui/viewmodels/HistoryViewModel.java create mode 100644 app/src/main/java/com/mugames/vidsnap/ui/viewmodels/HistoryViewModel.kt create mode 100644 app/src/main/java/com/mugames/vidsnap/ui/viewmodels/factory/HistoryViewModelFactory.kt diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 34541df..c29aa7f 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -7,7 +7,7 @@