From 3cbbd6042b0b03f9d90401178bc64f40f71afa18 Mon Sep 17 00:00:00 2001 From: miruka Date: Wed, 6 Nov 2019 11:03:08 -0400 Subject: [PATCH] Show upload file size instead of index/upcount --- TODO.md | 4 ++-- src/qml/Chat/UploadsBar.qml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO.md b/TODO.md index abe6afe1..22216f60 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,6 @@ - Media - - Uploading progress bar - - Text bubbles theming + - Show upload progression + - Theming (upload bar, media text bubbles) - Downloading - Bottom/top bar - Image loading progress bar diff --git a/src/qml/Chat/UploadsBar.qml b/src/qml/Chat/UploadsBar.qml index 2ed9b6d4..e761bb72 100644 --- a/src/qml/Chat/UploadsBar.qml +++ b/src/qml/Chat/UploadsBar.qml @@ -80,8 +80,8 @@ Rectangle { HLabel { id: uploadCountLabel visible: Layout.preferredWidth > 0 - text: qsTr("%1/%2") - .arg(model.index + 1).arg(uploadsList.model.count) + text: qsTr("%1") + .arg(CppUtils.formattedBytes(model.total_size)) topPadding: theme.spacing / 2 bottomPadding: topPadding @@ -89,7 +89,7 @@ Rectangle { rightPadding: leftPadding Layout.preferredWidth: - uploadsList.model.count < 2 ? 0 : implicitWidth + model.status === "Uploading" ? implicitWidth : 0 Behavior on Layout.preferredWidth { HNumberAnimation {} } }