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

recent: update recent repo list when opening repo #1001

Merged
merged 1 commit into from Oct 26, 2019

Conversation

@stimut
Copy link
Contributor

stimut commented Oct 20, 2019

Currently, the recent repo list is only updated when the application is
exited, due to the list being stored in the settings, which are saved on
exit. As well as newly opened repos not showing on the recent list, it
means that if you start on repo A, open repo B, then open repo C, and
finally exit, repo B will not have been added to the recent list.

With this change, when a repo is opened it will be added to the recent
list immediately, and will therefore show in the recent repo list in the
menu. In addition to that, a signal was created for the changing of the
worktree, so that the bookmarks widget for the recent repo list can be
updated.

Closes #937
Signed-off-by: Tim Brown stimut@gmail.com

Currently, the recent repo list is only updated when the application is
exited, due to the list being stored in the settings, which are saved on
exit. As well as newly opened repos not showing on the recent list, it
means that if you start on repo A, open repo B, then open repo C, and
finally exit, repo B will not have been added to the recent list.

With this change, when a repo is opened it will be added to the recent
list immediately, and will therefore show in the recent repo list in the
menu. In addition to that, a signal was created for the changing of the
worktree, so that the bookmarks widget for the recent repo list can be
updated.

Closes #937
Signed-off-by: Tim Brown stimut@gmail.com
@stimut

This comment has been minimized.

Copy link
Contributor Author

stimut commented Oct 20, 2019

I'm open to feedback on where the best place to put the functionality is. In particular, where the code should go that saves the newly opened repo to the recent list.

I put it in cmds.py as I wanted it to trigger no matter how a repo was opened.

davvid added a commit that referenced this pull request Oct 26, 2019
…s list

Signed-off-by: David Aguilar <davvid@gmail.com>
@davvid davvid merged commit c361ef5 into git-cola:master Oct 26, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
davvid added a commit that referenced this pull request Oct 26, 2019
* stimut/add-to-recent-on-open:
  recent: update recent repo list when opening repo

Signed-off-by: David Aguilar <davvid@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.