net-im/spectral/spectral-854 patched to build with libQuotient-0.6.0
This commit is contained in:
parent
c0edf31ef6
commit
9863e710c2
52
net-im/spectral/files/libQuotient-0.6.patch-1.patch
Normal file
52
net-im/spectral/files/libQuotient-0.6.patch-1.patch
Normal file
@ -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<SetRoomStateJob>(
|
||||||
|
- id(), "m.room.avatar", QJsonObject{{"url", job->contentUri()}});
|
||||||
|
+ connection()->callApi<SetRoomStateWithKeyJob>(
|
||||||
|
+ 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) {
|
22
net-im/spectral/files/libQuotient-0.6.patch-2.patch
Normal file
22
net-im/spectral/files/libQuotient-0.6.patch-2.patch
Normal file
@ -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();
|
||||||
|
}
|
||||||
|
}
|
@ -32,7 +32,7 @@ RDEPEND="
|
|||||||
dev-qt/qtmultimedia[qml]
|
dev-qt/qtmultimedia[qml]
|
||||||
dev-qt/qtwidgets
|
dev-qt/qtwidgets
|
||||||
>=dev-qt/qtquickcontrols2-5.12
|
>=dev-qt/qtquickcontrols2-5.12
|
||||||
=dev-libs/libQuotient-0.6_beta1
|
>=dev-libs/libQuotient-0.6.0
|
||||||
dev-libs/libQtOlm
|
dev-libs/libQtOlm
|
||||||
dev-libs/qtkeychain
|
dev-libs/qtkeychain
|
||||||
|| ( media-fonts/roboto media-fonts/noto )
|
|| ( media-fonts/roboto media-fonts/noto )
|
||||||
@ -44,6 +44,12 @@ DEPEND="
|
|||||||
>=dev-qt/qtcore-5.12
|
>=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() {
|
src_prepare() {
|
||||||
if [[ ${PV} != 9999 ]]
|
if [[ ${PV} != 9999 ]]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user