Api caching (#5496)

* Added Caching on all home page

* removed cache files

* Added flag for api caching

* Fix multiple api calls

* added fragment safe check

* added in clear

* refector

* Fix loader issue on background

* Fix issues

* code cleanup

* skip device details modifiy api

* Fix Api Call missing
This commit is contained in:
shankar yadav
2023-02-28 15:00:00 +05:30
committed by GitHub Enterprise
parent bd7d42dcb2
commit 9d59052d00
2 changed files with 2 additions and 2 deletions

View File

@@ -127,7 +127,7 @@ class ProductFragment : BaseFragment(), WidgetCallback, DashboardPolicyBenefitBo
override fun onResume() {
super.onResume()
if (TemporaryStorageHelper.isDataModified(dashboardTab?.name.orEmpty())) {
if (productVM.dashboardContentResponse.value.isNull() || TemporaryStorageHelper.isDataModified(dashboardTab?.name.orEmpty())) {
dashboardTab?.metaData?.clickedData?.let { sendAnalytics(it) }
loadScreen()
}

View File

@@ -72,5 +72,5 @@ fun Float.getLesserMultiple(x: Int): Float {
}
fun isDataNeedsToUpdate(method: String, url: String): Boolean {
return method != "GET" && url.contains("user-device-data/location").not()
return method != "GET" && url.contains("/user-device-data/location").not() && url.contains("/user-device-data/apps").not()
}