mobile: remove overwriting of line special case in ui-notification

On startup, we showed progress of the population of the fulltext
and listmodels for every 100th dive. This worked by overwriting
the last line if the new line started with '\r'. Since we don't
do that anymore, we can remove this special case.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-04-13 10:49:33 +02:00 committed by Dirk Hohndel
parent 8b93d67106
commit 24eac8df87

View file

@ -50,14 +50,7 @@ Kirigami.ApplicationWindow {
showPassiveNotification(notificationText, 5000)
}
} else {
var oldText = textBlock.text
if (notificationText.startsWith("\r")) {
// replace the last line that was sent
oldText = oldText.substr(0, oldText.lastIndexOf("\n"))
textBlock.text = oldText + "\n" + notificationText.substr(1)
} else {
textBlock.text = oldText + "\n" + notificationText
}
textBlock.text = textBlock.text + "\n" + notificationText
}
}
visible: false