Merge branch 'master' into powerlevel

This commit is contained in:
Black Hat
2020-01-05 10:05:19 -08:00
4 changed files with 15 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
build-appimage: build-appimage:
image: registry.gitlab.com/b0/qt-docker image: registry.gitlab.com/spectral-im/qt-docker:latest
stage: build stage: build
script: script:
- git clone https://gitlab.matrix.org/matrix-org/olm.git && cd olm - git clone https://gitlab.matrix.org/matrix-org/olm.git && cd olm
@@ -32,7 +32,7 @@ build-appimage:
- spectral.AppImage - spectral.AppImage
build-flatpak: build-flatpak:
image: registry.gitlab.com/b0/flatpak-kde-docker image: registry.gitlab.com/spectral-im/flatpak-kde-docker:latest
stage: build stage: build
script: script:
- cd flatpak - cd flatpak

View File

@@ -18,26 +18,26 @@ modules:
sources: sources:
- type: git - type: git
url: https://gitlab.matrix.org/matrix-org/olm.git url: https://gitlab.matrix.org/matrix-org/olm.git
tag: 3.1.3 tag: 3.1.4
commit: ebd3ba6cc17862aefc9cb3299d60aeae953cc143 commit: 6753595300767dd70150831dbbe6f92d64e75038
disable-shallow-clone: true disable-shallow-clone: true
config-opts: config-opts:
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
- name: cmark - name: cmark
buildsystem: cmake-ninja buildsystem: cmake-ninja
sources: sources:
- sha256: acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc - sha256: 2558ace3cbeff85610de3bda32858f722b359acdadf0c4691851865bb84924a6
type: archive type: archive
url: https://github.com/commonmark/cmark/archive/0.28.3.tar.gz url: https://github.com/commonmark/cmark/archive/0.29.0.tar.gz
builddir: true builddir: true
config-opts: config-opts:
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
- -DCMARK_TESTS=OFF - -DCMARK_TESTS=OFF
- name: libsecret - name: libsecret
sources: sources:
- sha256: 33ee5dfd3556931b81d47111890c8b9c51093b4ced18e0e87f51c1769e24d43c - sha256: 303c6e8cf3e12534e885b0682cd6130716c6834397b76d3829321b6d83b2389c
type: archive type: archive
url: https://gitlab.gnome.org/GNOME/libsecret/-/archive/0.18.8/libsecret-0.18.8.tar.gz url: https://gitlab.gnome.org/GNOME/libsecret/-/archive/0.19.1/libsecret-0.19.1.tar.gz
config-opts: config-opts:
- --disable-static - --disable-static
- --disable-gtk-doc - --disable-gtk-doc
@@ -45,9 +45,9 @@ modules:
- name: qtkeychain - name: qtkeychain
buildsystem: cmake buildsystem: cmake
sources: sources:
- sha256: 9c2762d9d0759a65cdb80106d547db83c6e9fdea66f1973c6e9014f867c6f28e - sha256: 5f916cd97843de550467db32d2e10f218b904af5b21cfdfcc7c6425d7dfc3ec2
type: archive type: archive
url: https://github.com/frankosterfeld/qtkeychain/archive/v0.9.1.tar.gz url: https://github.com/frankosterfeld/qtkeychain/archive/v0.10.0.tar.gz
config-opts: config-opts:
- -DCMAKE_INSTALL_LIBDIR=/app/lib - -DCMAKE_INSTALL_LIBDIR=/app/lib
- -DLIB_INSTALL_DIR=/app/lib - -DLIB_INSTALL_DIR=/app/lib

View File

@@ -75,7 +75,7 @@ ColumnLayout {
padding: 0 padding: 0
background: AutoRectangle { background: AutoRectangle {
readonly property int minorRadius: 8 readonly property int minorRadius: 2
id: bubbleBackground id: bubbleBackground

View File

@@ -237,6 +237,7 @@ QString SpectralRoom::eventToString(const RoomEvent& evt,
[prettyPrint, removeReply](const RoomMessageEvent& e) { [prettyPrint, removeReply](const RoomMessageEvent& e) {
using namespace MessageEventContent; using namespace MessageEventContent;
// 1. prettyPrint/HTML
if (prettyPrint && e.hasTextContent() && if (prettyPrint && e.hasTextContent() &&
e.mimeType().name() != "text/plain") { e.mimeType().name() != "text/plain") {
auto htmlBody = static_cast<const TextContent*>(e.content())->body; auto htmlBody = static_cast<const TextContent*>(e.content())->body;
@@ -261,10 +262,11 @@ QString SpectralRoom::eventToString(const RoomEvent& evt,
return !fileCaption.isEmpty() ? fileCaption : tr("a file"); return !fileCaption.isEmpty() ? fileCaption : tr("a file");
} }
// 2. prettyPrint/text 3. plainText/HTML 4. plainText/text
QString plainBody; QString plainBody;
if (e.hasTextContent() && e.content()) { if (e.hasTextContent() && e.content() && e.mimeType().name() == "text/plain") { // 2/4
plainBody = static_cast<const TextContent*>(e.content())->body; plainBody = static_cast<const TextContent*>(e.content())->body;
} else { } else { // 3
plainBody = e.plainBody(); plainBody = e.plainBody();
} }