brain-marks icon indicating copy to clipboard operation
brain-marks copied to clipboard

Pull to Refresh

Open mikaelacaron opened this issue 4 years ago • 8 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like

  • Add pull to refresh on the categories screen
    • Refresh the categories from AWS Amplify DataStore
  • Add pull to refresh on the tweets screen
    • Fetch all tweets for the certain category from the Twitter API

Describe alternatives you've considered None

Additional context N/A

mikaelacaron avatar Oct 02 '21 00:10 mikaelacaron

Could you please assign this to me? I am going to make an attempt on this! Only thing I'm wondering is if this feature is truly necessary since the application updates automatically every time you add a Tweet or Category.

haIIux avatar Oct 06 '21 23:10 haIIux

I can add you! Currently it does not! Only when you add a new tweet it'll fetch the tweet info needed and save it with the associated category.

I had noticed on my own app for some reason the picture data was gone and the only way to fix that would be to refresh the categories/tweets

mikaelacaron avatar Oct 07 '21 00:10 mikaelacaron

Interesting, when I used the simulator and added a Category, it immediately added it to the list. Additionally in the simulator, when I added a Tweet to a category it added right away. Regardless, I will try to determine the most appropriate method to implement this feature. I have one roughed out and I believe it works, just need to figure out how to test it properly since I'm not having an issue lol

haIIux avatar Oct 07 '21 00:10 haIIux

Totally understand! It seems to be a weird use case. I think refreshing the tweet data (rather than categories) would suffice!

That's where I had the issue, rather than on the categories

mikaelacaron avatar Oct 07 '21 01:10 mikaelacaron

https://user-images.githubusercontent.com/47156971/136305975-4cb6eb0b-3594-44ab-8313-50752c6c9300.mp4

Current rendition. I need to figure out how to properly get the emptyView() properly centered again.

haIIux avatar Oct 07 '21 01:10 haIIux

The tweets shouldn't not be there and then you have to pull to see them.

They should all be there (fetched from DataStore) when you go to the tweet list and then if the user wanted to, they could "pull to refresh" which would fetch all those tweets again, possibly by the id of the tweet.

mikaelacaron avatar Oct 07 '21 12:10 mikaelacaron

You're right, I should've elaborated that this was just my test example to ensure that it was fetching on the pull. I simply commented out one line to get this testing function as I do not know XCTests :(

haIIux avatar Oct 07 '21 12:10 haIIux

The unit tests aren't 100% needed, but it would be nice.

I'm probably going to make a separate issue for adding unit tests throughout the project.

mikaelacaron avatar Oct 07 '21 12:10 mikaelacaron