prepare to aurora 5.1.1

This commit is contained in:
Nikolay Sinyov 2024-07-04 01:30:15 +03:00
parent 2d1ac1e98f
commit 1b0e404fce
30 changed files with 26269 additions and 105 deletions

1
.gitignore vendored
View file

@ -31,6 +31,7 @@ Makefile*
*build-*
*.qm
*.prl
*.list
# Qt unit tests
target_wrapper.*

View file

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

@ -1,11 +1,13 @@
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Icon=harbour-fernschreiber
Exec=harbour-fernschreiber
Icon=org.ygriega.Fernschreiber
Exec=/usr/bin/org.ygriega.Fernschreiber
Name=Fernschreiber
Name[ru]=Fernschreiber
[X-Sailjail]
[X-Application]
Permissions=Audio;Documents;Downloads;Internet;Location;MediaIndexing;Microphone;Music;Pictures;PublicDir;RemovableMedia;UserDirs;Videos
OrganizationName=de.ygriega
ApplicationName=fernschreiber
OrganizationName=org.ygriega
ApplicationName=Fernschreiber
ExecDBus=/usr/bin/org.ygriega.Fernschreiber

View file

@ -10,9 +10,9 @@
# - translation filenames have to be changed
# The name of your application
TARGET = harbour-fernschreiber
TARGET = org.ygriega.Fernschreiber
CONFIG += sailfishapp sailfishapp_i18n
CONFIG += auroraapp sailfishapp_i18n
PKGCONFIG += nemonotifications-qt5 zlib
@ -65,7 +65,6 @@ DISTFILES += qml/harbour-fernschreiber.qml \
qml/components/PollPreview.qml \
qml/components/PressEffect.qml \
qml/components/ProfilePictureList.qml \
qml/components/ReactionButton.qml \
qml/components/ReplyMarkupButtons.qml \
qml/components/StickerPicker.qml \
qml/components/PhotoTextsListItem.qml \
@ -148,25 +147,25 @@ DISTFILES += qml/harbour-fernschreiber.qml \
qml/pages/SearchChatsPage.qml \
qml/pages/SettingsPage.qml \
qml/pages/VideoPage.qml \
rpm/harbour-fernschreiber.changes \
rpm/harbour-fernschreiber.spec \
rpm/org.ygriega.Fernschreiber.changes \
rpm/org.ygriega.Fernschreiber.spec \
translations/*.ts \
harbour-fernschreiber.desktop
org.ygriega.Fernschreiber.desktop
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172 256x256
AURORAAPP_ICONS = 86x86 108x108 128x128 172x172 256x256
TRANSLATIONS += translations/harbour-fernschreiber-de.ts \
translations/harbour-fernschreiber-es.ts \
translations/harbour-fernschreiber-fi.ts \
translations/harbour-fernschreiber-fr.ts \
translations/harbour-fernschreiber-hu.ts \
translations/harbour-fernschreiber-it.ts \
translations/harbour-fernschreiber-pl.ts \
translations/harbour-fernschreiber-ru.ts \
translations/harbour-fernschreiber-sv.ts \
translations/harbour-fernschreiber-sk.ts \
translations/harbour-fernschreiber-en.ts \
translations/harbour-fernschreiber-zh_CN.ts
TRANSLATIONS += translations/org.ygriega.Fernschreiber-de.ts \
translations/org.ygriega.Fernschreiber-es.ts \
translations/org.ygriega.Fernschreiber-fi.ts \
translations/org.ygriega.Fernschreiber-fr.ts \
translations/org.ygriega.Fernschreiber-hu.ts \
translations/org.ygriega.Fernschreiber-it.ts \
translations/org.ygriega.Fernschreiber-pl.ts \
translations/org.ygriega.Fernschreiber-ru.ts \
translations/org.ygriega.Fernschreiber-sv.ts \
translations/org.ygriega.Fernschreiber-sk.ts \
translations/org.ygriega.Fernschreiber-en.ts \
translations/org.ygriega.Fernschreiber-zh_CN.ts
equals(QT_ARCH, arm) {
message(Building ARM)
@ -196,22 +195,22 @@ images.path = /usr/share/$${TARGET}
ICONPATH = /usr/share/icons/hicolor
86.png.path = $${ICONPATH}/86x86/apps/
86.png.files += icons/86x86/harbour-fernschreiber.png
86.png.files += icons/86x86/$${TARGET}.png
108.png.path = $${ICONPATH}/108x108/apps/
108.png.files += icons/108x108/harbour-fernschreiber.png
108.png.files += icons/108x108/$${TARGET}.png
128.png.path = $${ICONPATH}/128x128/apps/
128.png.files += icons/128x128/harbour-fernschreiber.png
128.png.files += icons/128x128/$${TARGET}.png
172.png.path = $${ICONPATH}/172x172/apps/
172.png.files += icons/172x172/harbour-fernschreiber.png
172.png.files += icons/172x172/$${TARGET}.png
256.png.path = $${ICONPATH}/256x256/apps/
256.png.files += icons/256x256/harbour-fernschreiber.png
256.png.files += icons/256x256/$${TARGET}.png
fernschreiber.desktop.path = /usr/share/applications/
fernschreiber.desktop.files = harbour-fernschreiber.desktop
fernschreiber.desktop.files = $${TARGET}.desktop
database.files = db
database.path = /usr/share/$${TARGET}

View file

@ -39,7 +39,7 @@ ListItem {
readonly property var userInformation: tdLibWrapper.getUserInformation(myMessage.sender_id.user_id)
property QtObject precalculatedValues: ListView.view.precalculatedValues
readonly property color textColor: isOwnMessage ? Theme.highlightColor : Theme.primaryColor
readonly property int textAlign: isOwnMessage ? Text.AlignRight : Text.AlignLeft
readonly property int textAlign: Text.AlignLeft
readonly property Page page: precalculatedValues.page
readonly property bool isSelected: messageListItem.precalculatedValues.pageIsSelecting && page.selectedMessages.some(function(existingMessage) {
return existingMessage.id === messageId
@ -446,13 +446,13 @@ ListItem {
anchors {
left: parent.left
leftMargin: messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0
leftMargin: page.isPrivateChat ? (messageListItem.isOwnMessage ? precalculatedValues.pageMarginDouble : 0) : 0 //левый марджин для собственных сообщений в приватных чатах. В остальных на полную ширину
verticalCenter: parent.verticalCenter
}
height: messageTextColumn.height + precalculatedValues.paddingMediumDouble
width: precalculatedValues.backgroundWidth
property bool isUnread: messageIndex > chatModel.getLastReadMessageIndex() && myMessage['@type'] !== "sponsoredMessage"
color: Theme.colorScheme === Theme.LightOnDark ? (isUnread ? Theme.secondaryHighlightColor : Theme.secondaryColor) : (isUnread ? Theme.backgroundGlowColor : Theme.overlayBackgroundColor)
color: Theme.colorScheme === Theme.LightOnDark ? (isOwnMessage ? Theme.highlightBackgroundColor : (isUnread ? Theme.secondaryHighlightColor : Theme.secondaryColor)) : (isOwnMessage ? Theme.highlightBackgroundColor : (isUnread ? Theme.backgroundGlowColor : Theme.overlayBackgroundColor))
radius: parent.width / 50
opacity: isUnread ? 0.5 : 0.2
visible: appSettings.showStickersAsImages || (myMessage.content['@type'] !== "messageSticker" && myMessage.content['@type'] !== "messageAnimatedEmoji")
@ -487,7 +487,7 @@ ListItem {
truncationMode: TruncationMode.Fade
textFormat: Text.StyledText
horizontalAlignment: messageListItem.textAlign
visible: precalculatedValues.showUserInfo || myMessage['@type'] === "sponsoredMessage"
visible: messageListItem.isOwnMessage ? false : (precalculatedValues.showUserInfo || myMessage['@type'] === "sponsoredMessage")
MouseArea {
anchors.fill: parent
enabled: !(messageListItem.precalculatedValues.pageIsSelecting || messageListItem.isAnonymous)

View file

@ -1,56 +0,0 @@
Name: harbour-fernschreiber
Summary: Fernschreiber is a Telegram client for Sailfish OS
Version: 0.17
Release: 12
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt
URL: http://werkwolf.eu/
License: LICENSE
# This must be generated before uploading a package to a remote build service.
# Usually this line does not need to be modified.
Sources:
- '%{name}-%{version}.tar.bz2'
Description: |
Fernschreiber is a Telegram client for Sailfish OS
Configure: none
Builder: qmake5
# This section specifies build dependencies that are resolved using pkgconfig.
# This is the preferred way of specifying build dependencies for your package.
PkgConfigBR:
- sailfishapp >= 1.0.2
- Qt5Core
- Qt5Qml
- Qt5Quick
- Qt5DBus
- Qt5Sql
- Qt5Multimedia
- Qt5Positioning
- nemonotifications-qt5
- openssl
# NB: spectacle has a bug where it will remove custom "#<< macros" lines, so define them here:
Macros:
- '__provides_exclude_from;^%{_datadir}/.*$'
- '__requires_exclude;^libtdjson.*$'
- '_binary_payload;w6.xzdio'
# Build dependencies without a pkgconfig setup can be listed here
PkgBR:
- gperf
# Runtime dependencies which are not automatically detected
Requires:
- sailfishsilica-qt5 >= 0.10.9
- nemo-qml-plugin-contacts-qt5
# All installed files
Files:
- '%{_bindir}/%{name}'
- '%{_datadir}/%{name}'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/icons/hicolor/*/apps/%{name}.png'
# For more information about yaml and what's supported in Sailfish OS
# build system, please see https://wiki.merproject.org/wiki/Spectacle

View file

@ -3,7 +3,7 @@
# Generated by: spectacle version 0.32
#
Name: harbour-fernschreiber
Name: org.ygriega.Fernschreiber
# >> macros
# << macros
@ -18,9 +18,10 @@ Group: Qt/Qt
License: LICENSE
URL: http://werkwolf.eu/
Source0: %{name}-%{version}.tar.bz2
Source100: de.ygriega.Fernschreiber.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
#Requires: nemo-qml-plugin-contacts-qt5
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(auroraapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
@ -38,7 +39,8 @@ Fernschreiber is a Telegram client for Sailfish OS
%prep
%setup -q -n %{name}-%{version}
#%setup -q -n %{name}-%{version}
%autosetup
# >> setup
# << setup
@ -58,8 +60,8 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
# >> install pre
# << install pre
#%qmake5_install
make INSTALL_ROOT=%{buildroot} install
%qmake5_install
#make INSTALL_ROOT=%{buildroot} install
# >> install post
# << install post
@ -71,6 +73,7 @@ desktop-file-install --delete-original \
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%defattr(644,root,root,-)
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

View file

@ -45,7 +45,7 @@ namespace {
const QString KEY_SHOW_REACTION_BUTTON("showReactionButton");
}
AppSettings::AppSettings(QObject *parent) : QObject(parent), settings(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/org.ygriega/fernschreiber/settings.conf", QSettings::NativeFormat)
AppSettings::AppSettings(QObject *parent) : QObject(parent), settings(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/org.ygriega/Fernschreiber/settings.conf", QSettings::NativeFormat)
{
}

View file

@ -26,7 +26,7 @@ class DBusAdaptor : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.ygriega.fernschreiber")
Q_CLASSINFO("D-Bus Interface", "org.ygriega.Fernschreiber")
public:
DBusAdaptor(QObject *parent);

View file

@ -25,8 +25,8 @@
#include "dbusadaptor.h"
const QString INTERFACE_NAME = "org.ygriega.fernschreiber";
const QString PATH_NAME = "/org/ygriega/fernschreiber";
const QString INTERFACE_NAME = "org.ygriega.Fernschreiber";
const QString PATH_NAME = "/org/ygriega/Fernschreiber";
class DBusInterface : public QObject
{

View file

@ -335,7 +335,7 @@ void NotificationManager::publishNotification(const NotificationGroup *notificat
remoteActionArguments.append(QString::number(notificationGroup->chatId));
remoteActionArguments.append(messageMap.value(ID).toString());
nemoNotification->setRemoteAction(Notification::remoteAction("default", "openMessage",
"org.ygriega.fernschreiber", "/org/ygriega/fernschreiber", "org.ygriega.fernschreiber",
"org.ygriega.Fernschreiber", "/org/ygriega/Fernschreiber", "org.ygriega.Fernschreiber",
"openMessage", remoteActionArguments));
}

View file

@ -2348,9 +2348,9 @@ void TDLibWrapper::initializeOpenWith()
} else {
fileOut << QString("MimeType=x-url-handler/t.me;x-scheme-handler/tg;").toUtf8() << "\n";
}
fileOut << QString("X-Maemo-Service=org.ygriega.fernschreiber").toUtf8() << "\n";
fileOut << QString("X-Maemo-Object-Path=/org/ygriega/fernschreiber").toUtf8() << "\n";
fileOut << QString("X-Maemo-Method=org.ygriega.fernschreiber.openUrl").toUtf8() << "\n";
fileOut << QString("X-Maemo-Service=org.ygriega.Fernschreiber").toUtf8() << "\n";
fileOut << QString("X-Maemo-Object-Path=/org/ygriega/Fernschreiber").toUtf8() << "\n";
fileOut << QString("X-Maemo-Method=org.ygriega.Fernschreiber.openUrl").toUtf8() << "\n";
fileOut << QString("Hidden=true;").toUtf8() << "\n";
fileOut.flush();
desktopFile.close();
@ -2363,7 +2363,7 @@ void TDLibWrapper::initializeOpenWith()
LOG("Creating D-Bus directory" << dbusPathName);
dbusPath.mkpath(dbusPathName);
}
QString dbusServiceFileName = dbusPathName + "/org.ygriega.fernschreiber.service";
QString dbusServiceFileName = dbusPathName + "/org.ygriega.Fernschreiber.service";
QFile dbusServiceFile(dbusServiceFileName);
if (dbusServiceFile.exists()) {
LOG("D-BUS service file existing, removing to ensure proper re-creation...");
@ -2374,7 +2374,7 @@ void TDLibWrapper::initializeOpenWith()
QTextStream fileOut(&dbusServiceFile);
fileOut.setCodec("UTF-8");
fileOut << QString("[D-BUS Service]").toUtf8() << "\n";
fileOut << QString("Name=org.ygriega.fernschreiber").toUtf8() << "\n";
fileOut << QString("Name=org.ygriega.Fernschreiber").toUtf8() << "\n";
fileOut << QString("Exec=sailjail -- /usr/bin/org.ygriega.Fernschreiberr").toUtf8() << "\n";
fileOut.flush();
dbusServiceFile.close();

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1590,6 +1590,14 @@
<source>When tapping a quoted message, open it in chat instead of showing it in an overlay.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show reaction button on tap</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The reaction button may appear when you tap the message bubble, to make access to the reactions even easier.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsPage</name>

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1591,6 +1591,14 @@
<source>When tapping a quoted message, open it in chat instead of showing it in an overlay.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show reaction button on tap</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The reaction button may appear when you tap the message bubble, to make access to the reactions even easier.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsPage</name>

File diff suppressed because it is too large Load diff