status-desktop/ui/imports/shared/status/StatusChatImageQtyValidator.qml
Lukáš Tinkl 7c184f3500 fix(StatusChatInput): set max number of images to 6 to align with mobile
- re-evaluate the validators to be able to hide the warning after 3
seconds (the validators won't let the user select/paste an invalid
image; it's just the warning bubble that persisted)
- some small cleanups

Fixes #16210
2024-08-30 18:26:59 +02:00

14 lines
343 B
QML

import QtQuick 2.15
import utils 1.0
StatusChatImageValidator {
id: root
errorMessage: qsTr("You can only upload %n image(s) at a time", "", Constants.maxUploadFiles)
onImagesChanged: {
root.isValid = images.length <= Constants.maxUploadFiles
root.validImages = images.slice(0, Constants.maxUploadFiles)
}
}