Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pipeline {
/* Control output the filename */
APP_TYPE = "${utils.getAppType()}"
PLATFORM = "android/arm64"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
QT_VERSION = "6.9.2"
QT_ANDROID_PATH = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a"
QMAKE = "/opt/qt/${env.QT_VERSION}/android_arm64_v8a/bin/qmake"
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pipeline {
GOTMPDIR = "${env.WORKSPACE_TMP}"
PLATFORM = "ios/${getArch()}"
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
QT_VERSION="6.9.2"
QMAKE = "/Users/admin/${QT_VERSION}/ios/bin/qmake"
QT_HOST_PATH = "/Users/admin/${QT_VERSION}/macos"
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pipeline {
environment {
PLATFORM = "linux/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}"
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
/* Avoid weird bugs caused by stale cache. */
QML_DISABLE_DISK_CACHE = "true"
/* Set USE_NWAKU before VERSION since version.sh uses it */
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.linux-nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pipeline {
environment {
PLATFORM = "linux-nix/${getArch()}"
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
/* Avoid weird bugs caused by stale cache. */
QML_DISABLE_DISK_CACHE = "true"
/* Control output the filename */
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ pipeline {
environment {
PLATFORM = "macos/${getArch()}${(params.USE_NWAKU ?: false) ? '-nwaku' : ''}"
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
QT_VERSION="6.9.2"
QMAKE = "/Users/admin/${QT_VERSION}/macos/bin/qmake"
/* QMAKE = sh(script: "which qmake", returnStdout: true).trim() */
Expand Down
8 changes: 5 additions & 3 deletions ci/Jenkinsfile.tests-ui
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pipeline {
environment {
PLATFORM = 'tests/ui'
/* Improve make performance */
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
MAKEFLAGS = "-j${utils.getProcCount()} V=${params.VERBOSE}"
/* Makefile assumes the compiler folder is included */
QTDIR = "/opt/qt/6.9.2/gcc_64"
PATH = "${env.QTDIR}/bin:${env.PATH}"
Expand All @@ -70,8 +70,10 @@ pipeline {

stage('Check Translations') {
steps {
script {
checkTranslations()
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
Copy link
Member Author

@caybro caybro Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the TS file check optional; there's a Qt bug which doesn't catch qsTr() calls inside JS backticks

CC @siddarthkay @markoburcul

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like here:

title: `<font color='${Theme.palette.dangerColor1}'>`
+ `${qsTr("Keycard blocked")}</font>`
}

script {
checkTranslations()
}
}
}
}
Expand Down
19 changes: 10 additions & 9 deletions mobile/android/qt6/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />

<!-- features -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.fingerprint" android:required="false" />

<!-- dangerous permissions -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<supports-screens
android:anyDensity="true"
android:largeScreens="true"
Expand All @@ -36,7 +38,6 @@
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/Theme.AppSplash"
android:requestLegacyExternalStorage="true"
android:allowBackup="true"
android:hasFragileUserData="true"
android:fullBackupOnly="false">
Expand Down
2 changes: 1 addition & 1 deletion mobile/scripts/buildNimStatusClient.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ env $FEATURE_FLAGS ./vendor/nimbus-build-system/scripts/env.sh nim c "${PLATFORM
--cpu:"$CARCH" \
--noMain:on \
-d:release \
-d:production \
--clang.exe="$CC" \
--clang.linkerexe="$CC" \
--dynlibOverrideAll \
Expand All @@ -67,4 +68,3 @@ env $FEATURE_FLAGS ./vendor/nimbus-build-system/scripts/env.sh nim c "${PLATFORM
mkdir -p "$LIB_DIR"

cp "$STATUS_DESKTOP/bin/libnim_status_client$LIB_EXT" "$LIB_DIR/libnim_status_client$LIB_EXT"

2 changes: 1 addition & 1 deletion src/app/modules/main/profile_section/advanced/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ method onFleetSet*(self: Module) =
quit(QuitSuccess) # quits the app TODO: change this to logout instead when supported

method getLogDir*(self: Module): string =
return url_fromLocalFile(constants.LOGDIR)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fromLocalFile would give wrong result on Android

return constants.LOGDIR

method getWakuV2LightClientEnabled*(self: Module): bool =
return self.controller.getWakuV2LightClientEnabled()
Expand Down
8 changes: 1 addition & 7 deletions src/app_service/service/chat/async_tasks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ type
AsyncSendImagesTaskArg = ref object of QObjectTaskArg
chatId: string
imagePathsJson: string
tempDir: string
msg: string
replyTo: string
preferredUsername: string
Expand All @@ -118,14 +117,12 @@ const asyncSendImagesTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
try:
var images = Json.decode(arg.imagePathsJson, seq[string])
var imagePaths: seq[string] = @[]
var tempPaths: seq[string] = @[]

for imagePathOrSource in images.mitems:
if utils.isBase64DataUrl(imagePathOrSource):
let imagePath = save_byte_image_to_file(imagePathOrSource, arg.tempDir)
let imagePath = save_byte_image_to_file(imagePathOrSource)
if imagePath != "":
imagePaths.add(imagePath)
tempPaths.add(imagePath)
else:
imagePaths.add(imagePathOrSource)

Expand All @@ -140,9 +137,6 @@ const asyncSendImagesTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
arg.paymentRequests
)

for imagePath in tempPaths:
removeFile(imagePath)

arg.finish(%* {
"response": response,
"chatId": arg.chatId,
Expand Down
2 changes: 0 additions & 2 deletions src/app_service/service/chat/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import backend/group_chat as status_group_chat
import app/global/[global_singleton, utils]
import app/core/eventemitter
import app/core/signals/types
import constants

import ../../common/message as message_common

Expand Down Expand Up @@ -428,7 +427,6 @@ QtObject:
slot: "onAsyncSendImagesDone",
chatId: chatId,
imagePathsJson: imagePathsJson,
tempDir: TMPDIR.replace("\\", "\\\\"), # Escape backslashes so that the JSON sent is valid (Windows issue)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TMPDIR doesn't work on Android

msg: msg,
replyTo: replyTo,
preferredUsername: preferredUsername,
Expand Down
2 changes: 1 addition & 1 deletion storybook/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(MSVC)
endif()

if (APPLE)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=11.0)
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=14.0)
endif()

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
Expand Down
36 changes: 36 additions & 0 deletions storybook/pages/StatusNavBarTabButtonPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import QtQuick.Controls
import StatusQ.Controls
import StatusQ.Components.private
import StatusQ.Core.Theme
import StatusQ.Popups

import shared.controls.chat.menuItems

import Models
import Storybook
Expand All @@ -13,6 +16,7 @@ SplitView {

ButtonGroup {
buttons: column.children
onClicked: button => console.info("Clicked button:", button.tooltip.text)
}

Rectangle {
Expand Down Expand Up @@ -82,6 +86,38 @@ SplitView {
// when: ctrlNewBadgeGradient.checked
// }
}
StatusNavBarTabButton {
icon.name: "info"
tooltip.text: "With context menu"
thirdpartyServicesEnabled: thirdpartyServicesCtrl.checked
popupMenu: popupMenuComp
}
}
}

Component {
id: popupMenuComp
StatusMenu {
StatusAction {
text: qsTr("Invite People")
icon.name: "share-ios"
}

StatusAction {
text: qsTr("Community Info")
icon.name: "info"
}

StatusAction {
text: qsTr("Community Rules")
icon.name: "text"
}

StatusMenuSeparator {}

MuteChatMenuItem {
title: qsTr("Mute Community")
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions storybook/pages/SupportedTokenListsPanelPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Storybook
import Models

import AppLayouts.Profile.panels
import AppLayouts.Profile.stores

import StatusQ

Expand Down Expand Up @@ -39,7 +38,6 @@ SplitView {

Logs { id: logs }


Pane {
SplitView.fillWidth: true
SplitView.fillHeight: true
Expand All @@ -48,8 +46,6 @@ SplitView {
anchors.fill: parent
sourcesOfTokensModel: root.sourcesOfTokensModel
tokensListModel: root.tokensProxyModel

onItemClicked: logs.logEvent("SupportedTokenListsPanel::onItemClicked --> Key --> " + key)
}
}

Expand Down
4 changes: 4 additions & 0 deletions ui/StatusQ/include/StatusQ/urlutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ class UrlUtils : public QObject
// ["jpg", "jpe", "jp", "jpeg", "png", "webp", "gif", "svg"]
QStringList m_allImgExtensions;
QStringList allValidImageExtensions() const { return m_allImgExtensions; }

#ifdef Q_OS_ANDROID
QString resolveAndroidContentUrl(const QString& urlPath) const;
#endif
};
2 changes: 1 addition & 1 deletion ui/StatusQ/src/StatusQ/Components/StatusMessage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Control {
albumCount: root.messageDetails.albumCount > 0 ? root.messageDetails.albumCount : 1
imageWidth: Math.min(messageLayout.width / root.messageDetails.albumCount - 9 * (root.messageDetails.albumCount - 1), 144)
shapeType: StatusImageMessage.ShapeType.LEFT_ROUNDED
onImageClicked: root.imageClicked(image, mouse, imageSource)
onImageClicked: (image, mouse, imageSource) => root.imageClicked(image, mouse, imageSource)
}
}
}
Expand Down
42 changes: 10 additions & 32 deletions ui/StatusQ/src/StatusQ/Controls/StatusNavBarTabButton.qml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import QtQuick
import QtQuick.Controls

import StatusQ.Core
import StatusQ.Components
import StatusQ.Controls
import StatusQ.Popups
import StatusQ.Core.Theme

StatusIconTabButton {
Expand All @@ -28,7 +28,7 @@ StatusIconTabButton {
visible: statusNavBarTabButton.hovered && !!statusTooltip.text
delay: 50
orientation: StatusToolTip.Orientation.Right
x: statusNavBarTabButton.width + 16
x: statusNavBarTabButton.width + Theme.padding
y: statusNavBarTabButton.height / 2 - height / 2 + 4
}

Expand Down Expand Up @@ -62,36 +62,14 @@ StatusIconTabButton {
border.width: 2
}

StatusMouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: function(mouse) {
if (mouse.button === Qt.RightButton) {
if (!!popupMenuSlot.sourceComponent && !popupMenuSlot.active)
popupMenuSlot.active = true
if (popupMenuSlot.active) {
statusNavBarTabButton.highlighted = true
let btnWidth = statusNavBarTabButton.width
popupMenuSlot.item.popup(parent.x + btnWidth + 4, -2)
}
} else if (mouse.button === Qt.LeftButton) {
statusNavBarTabButton.toggle()
statusNavBarTabButton.clicked()
}
}
function openContextMenu(pos) {
if (!popupMenu)
return
const menu = popupMenu.createObject(statusNavBarTabButton)
statusTooltip.hide()
menu.popup(pos)
}

Loader {
id: popupMenuSlot
sourceComponent: statusNavBarTabButton.popupMenu
active: false
onLoaded: {
popupMenuSlot.item.closeHandler = function () {
statusNavBarTabButton.highlighted = false
popupMenuSlot.active = false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would close the submenu if not using cascaded menus, e.g on Android; each menu/submenu is a toplevel one

}
}
}
ContextMenu.onRequested: pos => openContextMenu(pos)
onPressAndHold: openContextMenu(Qt.point(statusNavBarTabButton.pressX, statusNavBarTabButton.pressY))
}

Loading