"No information" if device last updated date is invalid #LINQT-1646
do not display group call in meeting list display cancelled meetings fix account audio devices meeting description uncapitalize #LINQT-1892
This commit is contained in:
parent
faa8f73230
commit
580819df3a
10 changed files with 860 additions and 833 deletions
|
|
@ -78,10 +78,10 @@ void ConferenceInfoList::setSelf(QSharedPointer<ConferenceInfoList> me) {
|
||||||
}
|
}
|
||||||
items->push_back(nullptr); // Add Dummy conference for today
|
items->push_back(nullptr); // Add Dummy conference for today
|
||||||
for (auto conferenceInfo : conferenceInfos) {
|
for (auto conferenceInfo : conferenceInfos) {
|
||||||
if (conferenceInfo->getState() == linphone::ConferenceInfo::State::Cancelled) {
|
// if (conferenceInfo->getState() == linphone::ConferenceInfo::State::Cancelled) {
|
||||||
auto myAddress = defaultAccount->getParams()->getIdentityAddress();
|
// auto myAddress = defaultAccount->getParams()->getIdentityAddress();
|
||||||
if (!myAddress || myAddress->weakEqual(conferenceInfo->getOrganizer())) continue;
|
// if (!myAddress || myAddress->weakEqual(conferenceInfo->getOrganizer())) continue;
|
||||||
}
|
// }
|
||||||
auto confInfoCore = build(conferenceInfo);
|
auto confInfoCore = build(conferenceInfo);
|
||||||
// Cancelled conference organized ourself me must be hidden
|
// Cancelled conference organized ourself me must be hidden
|
||||||
if (confInfoCore) {
|
if (confInfoCore) {
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ bool ConferenceInfoProxy::SortFilterList::filterAcceptsRow(int sourceRow, const
|
||||||
auto list = qobject_cast<ConferenceInfoList *>(sourceModel());
|
auto list = qobject_cast<ConferenceInfoList *>(sourceModel());
|
||||||
auto ciCore = list->getAt<ConferenceInfoCore>(sourceRow);
|
auto ciCore = list->getAt<ConferenceInfoCore>(sourceRow);
|
||||||
if (ciCore) {
|
if (ciCore) {
|
||||||
|
if (ciCore->getDuration() == 0) return false;
|
||||||
bool searchTextInSubject = false;
|
bool searchTextInSubject = false;
|
||||||
bool searchTextInParticipant = false;
|
bool searchTextInParticipant = false;
|
||||||
if (ciCore->getSubject().contains(mFilterText, Qt::CaseInsensitive)) searchTextInSubject = true;
|
if (ciCore->getSubject().contains(mFilterText, Qt::CaseInsensitive)) searchTextInSubject = true;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -255,7 +255,7 @@ QVariantList SettingsModel::getCaptureDevices() const {
|
||||||
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
||||||
QVariantList list;
|
QVariantList list;
|
||||||
|
|
||||||
for (const auto &device : core->getAudioDevices()) {
|
for (const auto &device : core->getExtendedAudioDevices()) {
|
||||||
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityRecord)) {
|
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityRecord)) {
|
||||||
list << ToolModel::createVariant(device);
|
list << ToolModel::createVariant(device);
|
||||||
} else if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityAll)) {
|
} else if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityAll)) {
|
||||||
|
|
@ -270,7 +270,7 @@ QVariantList SettingsModel::getPlaybackDevices() const {
|
||||||
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
||||||
QVariantList list;
|
QVariantList list;
|
||||||
|
|
||||||
for (const auto &device : core->getAudioDevices()) {
|
for (const auto &device : core->getExtendedAudioDevices()) {
|
||||||
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityPlay)) {
|
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityPlay)) {
|
||||||
list << ToolModel::createVariant(device);
|
list << ToolModel::createVariant(device);
|
||||||
} else if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityAll)) {
|
} else if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityAll)) {
|
||||||
|
|
@ -286,7 +286,7 @@ QVariantList SettingsModel::getRingerDevices() const {
|
||||||
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
shared_ptr<linphone::Core> core = CoreModel::getInstance()->getCore();
|
||||||
QVariantList list;
|
QVariantList list;
|
||||||
|
|
||||||
for (const auto &device : core->getAudioDevices()) {
|
for (const auto &device : core->getExtendedAudioDevices()) {
|
||||||
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityPlay))
|
if (device->hasCapability(linphone::AudioDevice::Capabilities::CapabilityPlay))
|
||||||
list << ToolModel::createVariant(device);
|
list << ToolModel::createVariant(device);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,7 @@ QString Utils::formatElapsedTime(int seconds, bool dotsSeparator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Utils::formatDate(QDateTime date, bool includeTime, bool includeDateIfToday, QString format) {
|
QString Utils::formatDate(QDateTime date, bool includeTime, bool includeDateIfToday, QString format) {
|
||||||
|
if (!date.isValid()) return QString();
|
||||||
date = getOffsettedUTC(date);
|
date = getOffsettedUTC(date);
|
||||||
QString dateDay;
|
QString dateDay;
|
||||||
//: "Aujourd'hui"
|
//: "Aujourd'hui"
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,7 @@ ListView {
|
||||||
}
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
spacing: parent.spacing
|
spacing: parent.spacing
|
||||||
visible: modelData && !modelData.core.isReadOnly && modelData.core.isGroupChat
|
visible: modelData && !modelData.core.isReadOnly && modelData.core.isGroupChat || false
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Math.min(1, Math.round(1 * DefaultStyle.dp))
|
Layout.preferredHeight: Math.min(1, Math.round(1 * DefaultStyle.dp))
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ AbstractSettingsLayout {
|
||||||
Component.onCompleted: loading = true
|
Component.onCompleted: loading = true
|
||||||
model: AccountDeviceProxy {
|
model: AccountDeviceProxy {
|
||||||
id: accountDeviceProxy
|
id: accountDeviceProxy
|
||||||
account: model
|
account: mainItem.model
|
||||||
onDevicesSet: devices.loading = false;
|
onDevicesSet: devices.loading = false;
|
||||||
onRequestError: (errorMessage) => {
|
onRequestError: (errorMessage) => {
|
||||||
devices.loading = false;
|
devices.loading = false;
|
||||||
|
|
@ -329,6 +329,7 @@ AbstractSettingsLayout {
|
||||||
font: Typography.p2
|
font: Typography.p2
|
||||||
}
|
}
|
||||||
EffectImage {
|
EffectImage {
|
||||||
|
visible: dateText.lastDate != ""
|
||||||
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
|
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
|
||||||
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
|
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
|
||||||
imageSource: AppIcons.calendarBlank
|
imageSource: AppIcons.calendarBlank
|
||||||
|
|
@ -336,11 +337,17 @@ AbstractSettingsLayout {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: UtilsCpp.formatDate(modelData.core.lastUpdateTimestamp,false)
|
id: dateText
|
||||||
|
property string lastDate: UtilsCpp.formatDate(modelData.core.lastUpdateTimestamp,false)
|
||||||
|
text: lastDate != ""
|
||||||
|
? lastDate
|
||||||
|
//: "No information"
|
||||||
|
: qsTr("device_last_updated_time_no_info")
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font: Typography.p1
|
font: Typography.p1
|
||||||
}
|
}
|
||||||
EffectImage {
|
EffectImage {
|
||||||
|
visible: dateText.lastDate != ""
|
||||||
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
|
Layout.preferredWidth: Math.round(20 * DefaultStyle.dp)
|
||||||
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
|
Layout.preferredHeight: Math.round(20 * DefaultStyle.dp)
|
||||||
imageSource: AppIcons.clock
|
imageSource: AppIcons.clock
|
||||||
|
|
@ -348,6 +355,7 @@ AbstractSettingsLayout {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
|
visible: dateText.lastDate != ""
|
||||||
text: UtilsCpp.formatTime(modelData.core.lastUpdateTimestamp)
|
text: UtilsCpp.formatTime(modelData.core.lastUpdateTimestamp)
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font: Typography.p1
|
font: Typography.p1
|
||||||
|
|
|
||||||
|
|
@ -818,7 +818,6 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font {
|
font {
|
||||||
pixelSize: Math.round(14 * DefaultStyle.dp)
|
pixelSize: Math.round(14 * DefaultStyle.dp)
|
||||||
capitalization: Font.Capitalize
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue