voyager icon indicating copy to clipboard operation
voyager copied to clipboard

feat: present account switcher on long pressing profile button in navbar

Open rahulakrishna opened this issue 1 year ago • 4 comments

https://github.com/aeharding/wefwef/assets/10240002/6e976c17-cca5-4131-b74b-17a51a83857c

  • add react-hammer.js
  • present account switcher onPress

resolves: https://github.com/aeharding/wefwef/issues/85

rahulakrishna avatar Jul 01 '23 08:07 rahulakrishna

I need to push one more change before this PR can be reviewed

rahulakrishna avatar Jul 01 '23 12:07 rahulakrishna

this PR can be reviewed now

rahulakrishna avatar Jul 01 '23 15:07 rahulakrishna

Thanks for the PR. However the logic is too glitchy for this to be merged. There's more refactor needed to get this working well unfortunately, particularly to ActorRedirect

aeharding avatar Jul 07 '23 23:07 aeharding

Thanks for pointing me to ActorRedirect!

https://github.com/aeharding/voyager/assets/10240002/09e95149-029d-44b6-9f38-869fee344758

I've moved the redirect logic to ActorRedirect and removed the onSuccess callback

rahulakrishna avatar Jul 10 '23 08:07 rahulakrishna

@rahulakrishna, thanks for looking into that. I'm still seeing some odd behaviors, for example when you try to swipe back after switching accounts, or sometimes where tapping an account doesn't switch the first time.

Also, check out #390 from @zackhow - it seems to be very similar - perhaps you at @zackhow can collab on this?

aeharding avatar Jul 12 '23 03:07 aeharding

@zackhow @aeharding https://greasyfork.org/en/scripts/469273-lemmy-universal-link-switcher

these guys have clearly solved the issue of cross-instance posts. I'll see if I can port their logic to our app

rahulakrishna avatar Jul 27 '23 05:07 rahulakrishna

Thanks for this PR @rahulakrishna! I'm closing for now due to the outstanding issue above regarding animation/transition glitches. Feel free to make a new PR if you find a good solution for that!

aeharding avatar Aug 17 '23 22:08 aeharding