Refactor: Consider improving TabSessionState.getUrl to return the currentSession url when possible
Categories
(Firefox for Android :: Tabs, task)
Tracking
()
People
(Reporter: titouan, Unassigned)
References
Details
Follow up to Jackyzy823's comment on patch D211504:
I just rethink it again, I think we should review all chanegs of getProperUrl in D208215 carefully.
For example , is it ok for onShareActionClicked to not use ?: currentSession?.content?.url
We should consider writing a more generic extension that acts on SessionState that would just get the proper URL (if we have a non-null currentSession) so we don’t have to replicate the following kind of code (example here) everywhere:
val url = sessionId?.let {
store.state.findTab(it)?.getUrl()
} ?: currentSession?.content?.url
Currently getUrl acts on TabSessionState . It would be nice if we can return the proper URL regardless of whether or not it’s a custom or normal tab. It might not be doable, but worth considering how we can improve the current code.
| Reporter | ||
Comment 1•1 year ago
|
||
Jackyzy823, would it be something you would want to work on? (Asking because the insight came from your comment, in case you're instersting in following up)
Updated•1 year ago
|
Comment 2•1 year ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit BugBot documentation.
Description
•