adamprocter
adamprocter

@vincent when I am scrolling around in the MB app and then I do some interacts (maybe leave app for a moment) I often find myself back at the top of the timeline will new app have a way to be a little more sticky with my reading position? Have yet to jump to test flight yet but will soon

|
Embed
Progress spinner
vincent
vincent

@adamprocter Yes, this is an interesting one... This still persists in the current "new" beta. It's an iOS bug as far as I can figure out. What happens is that when you move the app into the background, iOS triggers a "the iOS theme has changed!!!!" - which basically the app listens for, and then changes the theme (even if it's back to the current theme - so it does a "light > dark > light" - because iOS tells it that). And because of us using webviews, it will cause a reload of said view = back to the top.

|
Embed
Progress spinner
adamprocter
adamprocter

@vincent ah thats annoying for you guys indeed. An Aside will the iOS / iPadOS 3.0 apps be staggered in release as the current iPadOS app layout is very nice (although I dont use it that much) and the current beta is just big iOS layout

|
Embed
Progress spinner
vincent
vincent

@adamprocter Version 3.0 will be a long beta... and there will be accomodations made for iPadOS at some stage...

|
Embed
Progress spinner
adamprocter
adamprocter

@vincent cool cool. Sounds great. Happy to help test what would I be missing on iPhone if I jump to beta now?

|
Embed
Progress spinner
sod
sod

@vincent Maybe this is fixable in the WebView/iOS end, but another solution could be to replaceState every time another post scrolls into view and when new posts have been successfully fetched.

So, at any point in time, the WebView's url looks something like this:

https://micro.blog/hybrid/more?before_id=14512374#post_14512201

Then, if the view is reloaded, the timeline will look more or less the same.

|
Embed
Progress spinner
vincent
vincent

@sod hmmm, that could be doable! I was actually thinking of keeping it simpler and just have a little timeout of the theme switch, and just cancel it if it was switching too quickly. Avoiding whatever it was doing.

|
Embed
Progress spinner
vincent
vincent

@sod I think your solution is good! And I like it because you can restore the state, which I might use 😅 For now I am checking on AppState to see if it's in the background, or not, and then trigger a theme change only when it's "active". If a theme change happens whilst the app is open but in the background, it will recheck as the app moves to the foreground and then re-apply the theme.

|
Embed
Progress spinner
vincent
vincent

@sod BTW, and sorry for not linking to the React Native webpage - seems to be killing my machine.

|
Embed
Progress spinner
sod
sod

@vincent That doesn't sound good. 😅 What is killing your machine, replaceState?

|
Embed
Progress spinner
vincent
vincent

@sod No no, the actual React Native website itself. Seems ok now... This is the "AppState" I was talking about.

|
Embed
Progress spinner