Can't put object in the first position of the box
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
I created a box of history videos (`Hive.openBox(HISTORY_BOX)`), when user watch video, the video is add to the history box, if the user watched the video before a week for example and watch it again today, i want to remove the video from a week ago, and put it first in the box, so the list can show this video today.
I have two operations to do, first to remove the video from the box, and the second is to add it again to the first position of the box.
To find the video i'm using `get(videoId, null)`, but when i put the video again, it's putted in some position and not at the first position of the box.
How can i add the video to the first position of the box **and still keeping on the `videoId` as a key of the saved video in the box**?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the box behavior around Hive.openBox(HISTORY_BOX), get(videoId, null), removal, reinsertion, and ordering. Determine whether the existing API supports moving a keyed entry to the first position; done means documenting the supported approach or defining and testing the required ordering behavior while retaining videoId as the key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100