diff --git a/net-im/spectral/files/libQuotient-0.6.patch-1.patch b/net-im/spectral/files/libQuotient-0.6.patch-1.patch new file mode 100644 index 0000000..5bffdb0 --- /dev/null +++ b/net-im/spectral/files/libQuotient-0.6.patch-1.patch @@ -0,0 +1,52 @@ +--- a/src/spectralroom.cpp 2020-04-16 04:44:53.000000000 +0200 ++++ b/src/spectralroom.cpp 2020-07-29 05:33:32.000000000 +0200 +@@ -167,7 +167,7 @@ + QDateTime SpectralRoom::lastActiveTime() const { + if (timelineSize() == 0) + return QDateTime(); +- return messageEvents().rbegin()->get()->timestamp(); ++ return messageEvents().rbegin()->get()->originTimestamp(); + } + + int SpectralRoom::savedTopVisibleIndex() const { +@@ -397,30 +397,30 @@ + const auto job = connection()->uploadFile(localFile.toLocalFile()); + if (isJobRunning(job)) { + connect(job, &BaseJob::success, this, [this, job] { +- connection()->callApi( +- id(), "m.room.avatar", QJsonObject{{"url", job->contentUri()}}); ++ connection()->callApi( ++ id(), "m.room.avatar", localUser()->id(), QJsonObject{{"url", job->contentUri()}}); + }); + } + } + + void SpectralRoom::addLocalAlias(const QString& alias) { +- auto aliases = localAliases(); +- if (aliases.contains(alias)) ++ auto a = aliases(); ++ if (a.contains(alias)) + return; + +- aliases += alias; ++ a += alias; + +- setLocalAliases(aliases); ++ setLocalAliases(a); + } + + void SpectralRoom::removeLocalAlias(const QString& alias) { +- auto aliases = localAliases(); +- if (!aliases.contains(alias)) ++ auto a = aliases(); ++ if (!a.contains(alias)) + return; + +- aliases.removeAll(alias); ++ a.removeAll(alias); + +- setLocalAliases(aliases); ++ setLocalAliases(a); + } + + QString SpectralRoom::markdownToHTML(const QString& markdown) { diff --git a/net-im/spectral/files/libQuotient-0.6.patch-2.patch b/net-im/spectral/files/libQuotient-0.6.patch-2.patch new file mode 100644 index 0000000..6e6ba62 --- /dev/null +++ b/net-im/spectral/files/libQuotient-0.6.patch-2.patch @@ -0,0 +1,22 @@ +--- a/src/publicroomlistmodel.cpp 2020-04-16 04:44:53.000000000 +0200 ++++ b/src/publicroomlistmodel.cpp 2020-07-29 05:33:32.000000000 +0200 +@@ -110,15 +110,14 @@ + attempted = true; + + if (job->status() == BaseJob::Success) { +- auto resp = job->data(); +- nextBatch = resp.nextBatch; ++ nextBatch = job->nextBatch(); + + this->beginInsertRows({}, rooms.count(), +- rooms.count() + resp.chunk.count() - 1); +- rooms.append(resp.chunk); ++ rooms.count() + job->chunk().count() - 1); ++ rooms.append(job->chunk()); + this->endInsertRows(); + +- if (resp.nextBatch.isEmpty()) { ++ if (job->nextBatch().isEmpty()) { + emit hasMoreChanged(); + } + } diff --git a/net-im/spectral/spectral-854.ebuild b/net-im/spectral/spectral-854.ebuild index d958c2b..861131f 100644 --- a/net-im/spectral/spectral-854.ebuild +++ b/net-im/spectral/spectral-854.ebuild @@ -32,7 +32,7 @@ RDEPEND=" dev-qt/qtmultimedia[qml] dev-qt/qtwidgets >=dev-qt/qtquickcontrols2-5.12 - =dev-libs/libQuotient-0.6_beta1 + >=dev-libs/libQuotient-0.6.0 dev-libs/libQtOlm dev-libs/qtkeychain || ( media-fonts/roboto media-fonts/noto ) @@ -44,6 +44,12 @@ DEPEND=" >=dev-qt/qtcore-5.12 " +PATCHES=( + # patches for build with libQuotient-0.6.0 + "${FILESDIR}/libQuotient-0.6.patch-1.patch" + "${FILESDIR}/libQuotient-0.6.patch-2.patch" +) + src_prepare() { if [[ ${PV} != 9999 ]] then