Summary:
I would like to enhance the return function in the Telegram web app to allow users to navigate back to the last viewed chat when clicking the return button on the top navigation bar.
Current Behavior:
After reviewing the source code, it seems that the original design only supports the return function in specific cases (e.g., navigating back to Saved Chats, Search, or Media Playing).
Questions:
Could you please clarify the original design logic behind the return functionality and why it was limited to these cases (Saved Chats, Search, Media)?
Is there any design rationale that might have excluded returning to the last viewed chat?
Enhancement Proposal: I’m considering implementing a feature where the return button on the top navigation returns the user to the last viewed chat. I’ve identified two potential ways to achieve this:
Using an API call to fetch the last viewed chat id.
Caching the previous chat state locally.
However, both approaches may not provide the best performance. Would you be able to suggest a more efficient way to get previous chat id?
Any guidance or insights would be much appreciated. Thanks!
Summary: I would like to enhance the return function in the Telegram web app to allow users to navigate back to the last viewed chat when clicking the return button on the top navigation bar.
Current Behavior: After reviewing the source code, it seems that the original design only supports the return function in specific cases (e.g., navigating back to Saved Chats, Search, or Media Playing).
Questions: Could you please clarify the original design logic behind the return functionality and why it was limited to these cases (Saved Chats, Search, Media)?
Is there any design rationale that might have excluded returning to the last viewed chat?
Enhancement Proposal: I’m considering implementing a feature where the return button on the top navigation returns the user to the last viewed chat. I’ve identified two potential ways to achieve this:
Using an API call to fetch the last viewed chat id. Caching the previous chat state locally. However, both approaches may not provide the best performance. Would you be able to suggest a more efficient way to get previous chat id?
Any guidance or insights would be much appreciated. Thanks!