Skip to content

Commit

Permalink
6.3.1 (#1058)
Browse files Browse the repository at this point in the history
- Fix flickering of chat background image
- Make keyboard auto-appear configurable
- Improve error propagation when uploading/downloading files
- Fix detection of omemo keys for groupchats
- Make several UI elements translatable now
- Fix error handling when creating groups
- Show used / discovered MUC servers in server details
  • Loading branch information
tmolitor-stud-tu committed May 3, 2024
2 parents f374800 + dfa2399 commit 9199038
Show file tree
Hide file tree
Showing 32 changed files with 486 additions and 239 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/beta.build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,22 @@ jobs:
chmod +x ./scripts/updateLocalization.sh
chmod +x ./scripts/xliff_extractor.py
./scripts/updateLocalization.sh BUILDSERVER
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-catalyst
path: Monal/build/app/Monal.zip
if-no-files-found: error
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-ios
path: Monal/build/ipa/Monal.ipa
if-no-files-found: error
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-catalyst-dsym
path: Monal/build/macos_Monal.xcarchive/dSYMs
if-no-files-found: error
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-ios-dsym
path: Monal/build/ios_Monal.xcarchive/dSYMs
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/develop-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,28 @@ jobs:
run: xcrun notarytool submit ./Monal/build/app/Monal.alpha.zip --wait --team-id S8D843U34Y --key "/Users/ci/appstoreconnect/apiKey.p8" --key-id "$(cat /Users/ci/appstoreconnect/apiKeyId.txt)" --issuer "$(cat /Users/ci/appstoreconnect/apiIssuerId.txt)"
- name: Update monal homebrew alpha repo
run: scripts/updateAlphaHomebrew.sh
#- uses: actions/upload-artifact@v3
# with:
# name: monal-catalyst
# path: "Monal/build/app/Monal.alpha.tar"
# if-no-files-found: error
#- uses: actions/upload-artifact@v3
# with:
# name: monal-ios
# path: "Monal/build/ipa/Monal.alpha.ipa"
# if-no-files-found: error
#- uses: actions/upload-artifact@v3
# with:
- uses: actions/upload-artifact@v4
with:
name: monal-catalyst
path: "Monal/build/app/Monal.alpha.tar"
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: monal-ios
path: "Monal/build/ipa/Monal.alpha.ipa"
if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-catalyst-dsym
# path: Monal/build/macos_Monal.xcarchive/dSYMs
# if-no-files-found: error
#- uses: actions/upload-artifact@v3
# with:
# - uses: actions/upload-artifact@v4
# with:
# name: monal-ios-dsym
# path: Monal/build/ios_Monal.xcarchive/dSYMs
# if-no-files-found: error
# - name: Update translations
# run: |
# chmod +x ./scripts/updateLocalization.sh
# chmod +x ./scripts/xliff_extractor.py
# ./scripts/updateLocalization.sh NOCOMMIT
34 changes: 17 additions & 17 deletions .github/workflows/stable.build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,41 +76,41 @@ jobs:
- name: Extract version number and changelog from newest merge commit
id: releasenotes
run: |
buildNumber=$(git tag --sort="v:refname" |grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
buildNumber=$(git tag --sort="v:refname" | grep "Build_iOS" | tail -n1 | sed 's/Build_iOS_//g')
echo "tag=Build_iOS_$buildNumber" >> "$GITHUB_OUTPUT"
echo "name=$(git log -n 1 --merges --pretty=format:%s)" >> "$GITHUB_OUTPUT"
echo "name=$(git log -n 1 --merges --pretty=format:%s | sed -E 's/^\s*([^\s]+)\s+\(([^\s]+)\)$/\1 (Build '$buildNumber', PR \2)/g')" >> "$GITHUB_OUTPUT"
echo "notes=$(git log -n 1 --merges --pretty=format:%b)" >> "$GITHUB_OUTPUT"
- name: Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ steps.releasenotes.outputs.name }}
tag_name: ${{ steps.releasenotes.outputs.tag }}
name: "Release ${{ steps.releasenotes.outputs.name }}"
tag_name: "${{ steps.releasenotes.outputs.tag }}"
target_commitish: stable
generate_release_notes: false
body: ${{ steps.releasenotes.outputs.notes }}
body: "${{ steps.releasenotes.outputs.notes }}"
files: |
./Monal/build/ipa/Monal.ipa
./Monal/build/app/Monal.zip
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-catalyst-pkg
path: Monal/build/app/Monal.pkg
if-no-files-found: error
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: monal-ios
path: Monal/build/ipa/Monal.ipa
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: monal-catalyst-dsym
path: Monal/build/macos_Monal.xcarchive/dSYMs
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: monal-ios-dsym
path: Monal/build/ios_Monal.xcarchive/dSYMs
if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-catalyst-dsym
# path: Monal/build/macos_Monal.xcarchive/dSYMs
# if-no-files-found: error
# - uses: actions/upload-artifact@v4
# with:
# name: monal-ios-dsym
# path: Monal/build/ios_Monal.xcarchive/dSYMs
# if-no-files-found: error
33 changes: 33 additions & 0 deletions .github/workflows/update-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# build a new beta release and push it to apple
name: update-translations

# Controls when the action will run.
on:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
updateTranslations:
# The type of runner that the job will run on
runs-on: self-hosted
env:
APP_NAME: "Monal"
APP_DIR: "Monal.app"
BUILD_TYPE: "Beta"
EXPORT_OPTIONS_CATALYST_APPSTORE: "../scripts/exportOptions/Stable_Catalyst_ExportOptions.plist"
EXPORT_OPTIONS_CATALYST_APP_EXPORT: "../scripts/exportOptions/Beta_Catalyst_ExportOptions.plist"
EXPORT_OPTIONS_IOS: "../scripts/exportOptions/Beta_iOS_ExportOptions.plist"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
clean: true
submodules: true
- name: Checkout submodules
run: git submodule update -f --init --remote
- name: Update translations
run: |
chmod +x ./scripts/updateLocalization.sh
chmod +x ./scripts/xliff_extractor.py
./scripts/updateLocalization.sh BUILDSERVER
2 changes: 2 additions & 0 deletions Monal/Alpha.Monal.macos.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<dict>
<key>aps-environment</key>
<string>production</string>
<key>com.apple.developer.usernotifications.filtering</key>
<true/>
<key>com.apple.developer.usernotifications.communication</key>
<true/>
<key>com.apple.security.app-sandbox</key>
Expand Down
24 changes: 12 additions & 12 deletions Monal/Classes/AddContactMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,24 +136,24 @@ struct AddContactMenu: View {
}
showLoadingOverlay(overlay, headline: NSLocalizedString("Adding...", comment: ""))
account.checkJidType(jid, withCompletion: { type, errorMsg in
if(type == "account") {
if type == "account" {
hideLoadingOverlay(overlay)
let contact = MLContact.createContact(fromJid: jid, andAccountNo: account.accountNo)
self.newContact = contact
MLXMPPManager.sharedInstance().add(contact, withPreauthToken:preauthToken)
//import omemo fingerprints as manually trusted, if requested
trustFingerprints(self.importScannedFingerprints ? self.scannedFingerprints : [:], for:jid, on:account)
successAlert(title: Text("Permission Requested"), message: Text("The new contact will be added to your contacts list when the person you've added has approved your request."))
} else if(type == "muc") {
} else if type == "muc" {
showLoadingOverlay(overlay, headline: NSLocalizedString("Adding Group/Channel...", comment: ""))
account.mucProcessor.addUIHandler({data in
let success : Bool = (data as! NSDictionary)["success"] as! Bool;
hideLoadingOverlay(overlay)
if(success) {
if success {
self.newContact = MLContact.createContact(fromJid: jid, andAccountNo: account.accountNo)
successAlert(title: Text("Success!"), message: Text(String.localizedStringWithFormat("Successfully joined group/channel %@!", jid)))
} else {
errorAlert(title: Text("Error entering group/channel!"))
errorAlert(title: Text("Error entering group/channel!"), message: Text((data as! NSDictionary)["errorMessage"] as! String))
}
}, forMuc: jid)
account.joinMuc(jid)
Expand All @@ -168,14 +168,14 @@ struct AddContactMenu: View {
let account = self.connectedAccounts[selectedAccount]
let splitJid = HelperTools.splitJid(account.connectionProperties.identity.jid)
Form {
if(connectedAccounts.isEmpty) {
if connectedAccounts.isEmpty {
Text("Please make sure at least one account has connected before trying to add a contact or channel.")
.foregroundColor(.secondary)
}
else
{
Section(header:Text("Contact and Group/Channel Jids are usually in the format: [email protected]")) {
if(connectedAccounts.count > 1) {
if connectedAccounts.count > 1 {
Picker("Use account", selection: $selectedAccount) {
ForEach(Array(self.connectedAccounts.enumerated()), id: \.element) { idx, account in
Text(account.connectionProperties.identity.jid).tag(idx)
Expand All @@ -196,15 +196,15 @@ struct AddContactMenu: View {
toAdd = toAdd.replacingOccurrences(of: " ", with: "")
}
}
if(scannedFingerprints != nil && scannedFingerprints!.count > 0) {
if scannedFingerprints != nil && scannedFingerprints!.count > 0 {
Section(header: Text("A contact was scanned through the QR code scanner")) {
Toggle(isOn: $importScannedFingerprints, label: {
Toggle(isOn: $importScannedFingerprints) {
Text("Import and trust OMEMO fingerprints from QR code")
})
}
}
}
Section {
if(scannedFingerprints != nil) {
if scannedFingerprints != nil {
Button(action: {
toAdd = ""
importScannedFingerprints = true
Expand All @@ -217,9 +217,9 @@ struct AddContactMenu: View {
Button(action: {
showAlert = toAddEmptyAlert || toAddInvalidAlert

if(!showAlert) {
if !showAlert {
let jidComponents = HelperTools.splitJid(toAdd)
if(jidComponents["host"] == nil || jidComponents["host"]!.isEmpty) {
if jidComponents["host"] == nil || jidComponents["host"]!.isEmpty {
errorAlert(title: Text("Error"), message: Text("Something went wrong while parsing the string..."))
showAlert = true
return
Expand Down
11 changes: 5 additions & 6 deletions Monal/Classes/ContactDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,14 @@ struct ContactDetails: View {
.addClearButton(isEditing: isEditingNickname, text: $contact.nickNameView)
}

Toggle("Pin Chat", isOn: Binding(get: {
Toggle(isOn: Binding(get: {
contact.isPinned
}, set: {
contact.obj.togglePinnedChat($0)
}))
// Button(contact.isPinned ? "Unpin Chat" : "Pin Chat") {
// contact.obj.togglePinnedChat(!contact.isPinned);
// }

})) {
Text("Pin Chat")
}

if(contact.obj.isGroup && contact.obj.mucType == "group") {
NavigationLink(destination: LazyClosureView(MemberList(mucContact:contact))) {
Text("Group Members")
Expand Down
57 changes: 31 additions & 26 deletions Monal/Classes/CreateGroupMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ struct CreateGroupMenu: View {

var body: some View {
Form {
if(connectedAccounts.isEmpty) {
if connectedAccounts.isEmpty {
Text("Please make sure at least one account has connected before trying to create new group.")
.foregroundColor(.secondary)
}
else
{
Section() {
Picker("Use account", selection: $selectedAccount) {
Picker(selection: $selectedAccount, label: Text("Use account")) {
ForEach(Array(self.connectedAccounts.enumerated()), id: \.element) { idx, account in
Text(account.connectionProperties.identity.jid).tag(account as xmpp?)
}
Expand All @@ -70,41 +70,46 @@ struct CreateGroupMenu: View {
Text("Change Group Members")
})
Button(action: {
guard let generatedJid = self.selectedAccount!.mucProcessor.generateMucJid() else {
errorAlert(title: Text("Error creating group!"), message: Text("Your server does not provide a MUC component."))
return
}
showLoadingOverlay(overlay, headline: NSLocalizedString("Creating Group", comment: ""))
let roomJid = self.selectedAccount!.mucProcessor.createGroup(nil)
if(roomJid == nil) {
let groupContact = MLContact.createContact(fromJid: roomJid!, andAccountNo: self.selectedAccount!.accountNo)
guard let roomJid = self.selectedAccount!.mucProcessor.createGroup(generatedJid) else {
//room already existing in our local bookmarks --> just open it
//this should never happen since we randomly generated a jid above
hideLoadingOverlay(overlay)
let groupContact = MLContact.createContact(fromJid: generatedJid, andAccountNo: self.selectedAccount!.accountNo)
self.delegate.dismissWithoutAnimation()
if let activeChats = self.appDelegate.activeChats {
activeChats.presentChat(with:groupContact)
}
} else {
self.selectedAccount!.mucProcessor.addUIHandler({data in
let success : Bool = (data as! NSDictionary)["success"] as! Bool;
if(success) {
self.selectedAccount!.mucProcessor.changeName(ofMuc: roomJid!, to: self.groupName)
for user in self.selectedContacts {
self.selectedAccount!.mucProcessor.setAffiliation("member", ofUser: user.contactJid, inMuc: roomJid!)
self.selectedAccount!.mucProcessor.inviteUser(user.contactJid, inMuc: roomJid!)
}
let groupContact = MLContact.createContact(fromJid: roomJid!, andAccountNo: self.selectedAccount!.accountNo)
hideLoadingOverlay(overlay)
self.delegate.dismissWithoutAnimation()
if let activeChats = self.appDelegate.activeChats {
activeChats.presentChat(with:groupContact)
}
} else {
hideLoadingOverlay(overlay)
errorAlert(title: Text("Error creating group!"))
}
}, forMuc: roomJid!)
return
}
self.selectedAccount!.mucProcessor.addUIHandler({data in
let success : Bool = (data as! NSDictionary)["success"] as! Bool;
if success {
self.selectedAccount!.mucProcessor.changeName(ofMuc: roomJid, to: self.groupName)
for user in self.selectedContacts {
self.selectedAccount!.mucProcessor.setAffiliation("member", ofUser: user.contactJid, inMuc: roomJid)
self.selectedAccount!.mucProcessor.inviteUser(user.contactJid, inMuc: roomJid)
}
let groupContact = MLContact.createContact(fromJid: roomJid, andAccountNo: self.selectedAccount!.accountNo)
hideLoadingOverlay(overlay)
self.delegate.dismissWithoutAnimation()
if let activeChats = self.appDelegate.activeChats {
activeChats.presentChat(with:groupContact)
}
} else {
hideLoadingOverlay(overlay)
errorAlert(title: Text("Error creating group!"), message: Text((data as! NSDictionary)["errorMessage"] as! String))
}
}, forMuc: roomJid)
}, label: {
Text("Create new group")
})
}
if(self.selectedContacts.count > 0) {
if self.selectedContacts.count > 0 {
Section(header: Text("Selected Group Members")) {
ForEach(self.selectedContacts, id: \.obj.contactJid) { contact in
ContactEntry(contact: contact)
Expand Down
Loading

0 comments on commit 9199038

Please sign in to comment.