mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 22:06:25 +00:00
b3f8af8e06
Qml code referring to the old code base commented out, but not deleted, due to easier refactoring the rest of the app.
27 lines
798 B
QML
27 lines
798 B
QML
import QtQuick 2.13
|
|
import QtQuick.Controls 2.13
|
|
import QtQuick.Layouts 1.13
|
|
import QtGraphicalEffects 1.0
|
|
|
|
import utils 1.0
|
|
import ".."
|
|
|
|
StatusChatImageValidator {
|
|
id: root
|
|
readonly property int maxImgSizeBytes: Constants.maxUploadFilesizeMB * 1048576 /* 1 MB in bytes */
|
|
|
|
onImagesChanged: {
|
|
// Not Refactored Yet
|
|
// let isValid = true
|
|
// root.validImages = images.filter(img => {
|
|
// let size = parseInt(utilsModel.getFileSize(img))
|
|
// const isSmallEnough = size <= maxImgSizeBytes
|
|
// isValid = isValid && isSmallEnough
|
|
// return isSmallEnough
|
|
// })
|
|
// root.isValid = isValid
|
|
}
|
|
//% "Max image size is %1 MB"
|
|
errorMessage: qsTrId("max-image-size-is--1-mb").arg(Constants.maxUploadFilesizeMB)
|
|
}
|