summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-07-06 15:32:49 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-07-10 11:54:13 (GMT)
commit8867a5e938bcfd9ddb55830373dd46b45daca1d9 (patch)
treef6c61be8e9aef0be333029ee93912be651711828 /Swift
parentf86ecc365a4efbde5dc388af7b083cb2b7908999 (diff)
downloadswift-8867a5e938bcfd9ddb55830373dd46b45daca1d9.zip
swift-8867a5e938bcfd9ddb55830373dd46b45daca1d9.tar.bz2
Stay scrolled at bottom of chat view during a file transfer
Swift did not remember the correct scrolled-at-bottom position for the current chat view after it added/updated file-transfer UI to the chat view. Test-Information: Tested with two Swift instances (one with the fix, one without) and send files in both directions. The instance with this fix, scrolls down along with new messages as they are recevied if the chat view is scrolled to the bottom. Change-Id: Ia9afa68254c3add5f7677b1f4b7ed3c7e1edcf6f
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp
index 57706d4..0c82e73 100644
--- a/Swift/QtUI/QtWebKitChatView.cpp
+++ b/Swift/QtUI/QtWebKitChatView.cpp
@@ -418,6 +418,7 @@ static QWebElement findElementWithID(QWebElement document, QString elementName,
}
void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageDone) {
+ rememberScrolledToBottom();
QWebElement ftElement = findElementWithID(document_, "div", id);
if (ftElement.isNull()) {
SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!" << std::endl;
@@ -431,6 +432,7 @@ void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageD
}
void QtWebKitChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& /* msg */) {
+ rememberScrolledToBottom();
QWebElement ftElement = findElementWithID(document_, "div", id);
if (ftElement.isNull()) {
SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl;