android-client icon indicating copy to clipboard operation
android-client copied to clipboard

Issue : Collection sheet Keeps on loading even the internet is turned off

Open ghost opened this issue 2 years ago • 2 comments

Summary: Collection sheet Keeps on loading even the internet is turned off

Steps to reproduce: 1.Turn of the internet 2.Go to Collection reports it keeps on loading instead of showing no internet...

Expected behaviour: Should show no internet...

Device and Android version:

What make and model device (e.g., Samsung Galaxy S3) did you encounter this on? What Android version (e.g., Android 4.0 Ice Cream Sandwich or Android 6.0 Marshmallow) are you running? Is it the stock version from the manufacturer or a custom ROM?

Screenshots:

Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.

ghost avatar Dec 07 '23 12:12 ghost

I want to work on this. Please assign this issue to me.

ashutosh-kumar-kushwaha avatar Dec 11 '23 16:12 ashutosh-kumar-kushwaha

Issue Description: The Collection Sheet feature exhibits unexpected behavior where it continues to load indefinitely even when the internet connection is disabled.

Steps to Reproduce:

Turn off the internet connection. Navigate to the Collection Reports section. Observe that the Collection Sheet continues to load endlessly instead of displaying a notification indicating no internet connection. Expected Behavior: The Collection Sheet should display a notification indicating the absence of an internet connection when the network is disabled, ensuring users are informed of the issue rather than experiencing indefinite loading.

Resolution Approach: made changes in NewIndividualCollectionSheetViewModel.kt in fun fetchOffices(), along with this also made changes to fun fetchStaff() which causedthe same issue when calling it without internet network.

A video demonstration for resolved code for given issue :

https://github.com/openMF/android-client/assets/97080887/3b2a4d9d-834c-413a-b71a-96c47c358392

A video demonstration for resolved code for the office event also:

https://github.com/openMF/android-client/assets/97080887/6cffe0dc-92fe-4ea4-9b1c-e0633166401f

@Thanush66 @Aditya-gupta99 , please assign this issue to me for the PR that will address this issue.

PraneGIT avatar Feb 18 '24 20:02 PraneGIT