mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Add recent action entries in correct sequence to menu.
This commit is contained in:
parent
23f8e3b4f8
commit
933a62de01
1 changed files with 6 additions and 7 deletions
|
@ -544,17 +544,16 @@ void Application::slotProgressSyncProblem(const QString& folder, const Progress:
|
|||
void Application::rebuildRecentMenus()
|
||||
{
|
||||
_recentActionsMenu->clear();
|
||||
QList<Progress::Info> progressInfoList;
|
||||
progressInfoList = ProgressDispatcher::instance()->recentChangedItems(5);
|
||||
const QList<Progress::Info>& progressInfoList = ProgressDispatcher::instance()->recentChangedItems(5);
|
||||
|
||||
if( progressInfoList.size() == 0 ) {
|
||||
_recentActionsMenu->addAction(tr("No items synced recently"));
|
||||
} else {
|
||||
foreach( Progress::Info info, progressInfoList ) {
|
||||
QString kindStr = tr("Upload");
|
||||
if( info.kind == Progress::EndDownload ) {
|
||||
kindStr = tr("Download");
|
||||
}
|
||||
QListIterator<Progress::Info> i(progressInfoList);
|
||||
i.toBack();
|
||||
while(i.hasPrevious()) {
|
||||
Progress::Info info = i.previous();
|
||||
QString kindStr = Progress::asResultString(info.kind);
|
||||
QString timeStr = info.timestamp.toString("hh:mm");
|
||||
|
||||
QString actionText = tr("%1 (%2, %3)").arg(info.current_file).arg(kindStr).arg(timeStr);
|
||||
|
|
Loading…
Reference in a new issue