mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-09-30 02:00:27 +03:00
Improve Git History navigation and asynchronous UI safety
Add a History ref selector for HEAD, local branches, remote branches, and tags without requiring checkout. Reuse cached branch-model display strings to keep large ref lists efficient. Make deferred main-thread callbacks lifetime-safe across ecode controllers and plugins. Initialize plugin dispatchers during UIReady and extend MainThreadLifetime to support delayed and tagged dispatch. Fix expandable Git History rows, empty merge projections, and commit-description expansion. Display only the physical first line while collapsed and avoid duplicating it in the expanded body. Add coverage for history ref handling and preserve stale-request guards during repository and revision changes. Fix UIImageViewer dimension reporting for sprites by displaying the underlying texture dimensions. The Git History interface remains a work in progress.
This commit is contained in:
@@ -111,7 +111,7 @@ GitHistoryModel::commitNode( Git::Commit commit, Node* parent,
|
||||
item->date = Sys::epochToString( item->commit.commitTime );
|
||||
item->hash = String::fromUtf8( item->commit.shortHash );
|
||||
item->tooltip = String::format( "%s\n%s <%s>\n%s", item->commit.hash, item->commit.authorName,
|
||||
item->commit.authorEmail, item->commit.subject );
|
||||
item->commit.authorEmail, item->commit.message );
|
||||
item->message = item->date + String{ " · " } + item->author + String{ " · " } + item->hash;
|
||||
if ( item->commit.parents.size() == 2 ) {
|
||||
item->query = query;
|
||||
@@ -207,6 +207,14 @@ void GitHistoryModel::setChildrenPage( Node* item, Git::HistoryPage page,
|
||||
return;
|
||||
Nodes children;
|
||||
fillPage( children, item, std::move( page ), query );
|
||||
if ( children.empty() ) {
|
||||
auto child = std::make_unique<Node>();
|
||||
child->type = NodeType::Empty;
|
||||
child->parent = item;
|
||||
child->message =
|
||||
mPlugin->i18n( "git_history_no_additional_commits", "No additional commits" );
|
||||
children.emplace_back( std::move( child ) );
|
||||
}
|
||||
item->childrenLoading = false;
|
||||
item->childrenLoaded = true;
|
||||
replaceChildren( item, std::move( children ) );
|
||||
|
||||
Reference in New Issue
Block a user