Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor LastUsedValuesStore to use sequences instead of LinkedList #3

Closed
wants to merge 190 commits into from

Conversation

smichel17
Copy link
Owner

@smichel17 smichel17 commented Oct 18, 2021

To be sent upstream once streetcomplete#3373 is merged

thefeiter and others added 30 commits October 3, 2021 01:32
The undo button popup menu allegedly exists because the history screen
makes it slower to undo the most recent entry. However, the menu itself
*also* makes it slower to undo the most recent entry, so it barely saves
any time. So, we might as well just open the full history directly.

streetcomplete#3330 (comment)
Undoing the most recent entry in the history is probably the most common
action, so we'd like it to be faster. This removes a tap by
pre-selecting the first entry when the sidebar is first opened.
This makes the most recent edit start at the bottom, so when you tap the
undo button, you don't need to move your hand far to undo the most
recent edit.

It would be nice to have a slightly larger bottom padding, so the button
lines up perfectly and it's just a double-tap.
'Concrete lanes' not 'Concrete without full cover'
# Conflicts:
#	app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestAutoSyncer.kt
@smichel17
Copy link
Owner Author

Why is favs @Injected here, and then also manually initialized?

@Inject internal lateinit var favs: LastPickedValuesStore<I>
private val selectedItem get() = imageSelector.selectedItem
protected open val itemsPerRow = 3
override fun onAttach(ctx: Context) {
super.onAttach(ctx)
favs = LastPickedValuesStore(PreferenceManager.getDefaultSharedPreferences(ctx.applicationContext))

@smichel17 smichel17 force-pushed the favs-refactor branch 2 times, most recently from 82de9eb to 4057a50 Compare October 19, 2021 14:57
matkoniecz and others added 23 commits October 19, 2021 17:18
- one more conversion option in a stile quest
- synonym in barrier type quest

Synonym may cause users to agonize over selecting exactly equivalent options. But will also reduce confusion when encountering a pedestrian gate and considering it as different from a vehicle gate.

fixes streetcomplete#3188
add pedestrian gate answer in barrier quests
Sort building type by recently used frequency
Using a sequence here doesn't really make sense, but it will in the next
commit when I remove LinkedList entirely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants