Compare commits

...

4 commits

Author SHA1 Message Date
Thomas Ricouard 361b5f1d84 Fix tests 2024-04-17 11:11:22 -07:00
Thomas Ricouard ad61600328 Fix localizations 2024-04-17 11:05:21 -07:00
Thomas Ricouard 5f1f71068c Update packages 2024-04-17 10:55:00 -07:00
tkgka 3782300b27
Fix StatusRowContentView invade SwipeActions area (#2007)
* Fix StatusRowContentView invade SwipeActions area

* ./ add padding inside StatusRowMediaPreviewView
2024-04-17 10:54:46 -07:00
6 changed files with 177 additions and 53 deletions

View file

@ -26,8 +26,6 @@
9F24EEB829360C330042359D /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9F24EEB729360C330042359D /* Preview Assets.xcassets */; };
9F295540292B6C3400E0E81B /* Timeline in Frameworks */ = {isa = PBXBuildFile; productRef = 9F29553F292B6C3400E0E81B /* Timeline */; };
9F2A540729699698009B2D7C /* SupportAppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A540629699698009B2D7C /* SupportAppView.swift */; };
9F2A540A29699705009B2D7C /* ReceiptParser in Frameworks */ = {isa = PBXBuildFile; productRef = 9F2A540929699705009B2D7C /* ReceiptParser */; };
9F2A540C29699705009B2D7C /* RevenueCat in Frameworks */ = {isa = PBXBuildFile; productRef = 9F2A540B29699705009B2D7C /* RevenueCat */; };
9F2A540E2969A0B0009B2D7C /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F2A540D2969A0B0009B2D7C /* StoreKit.framework */; };
9F2A5411296A1429009B2D7C /* PushNotificationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A5410296A1429009B2D7C /* PushNotificationsView.swift */; };
9F2A5419296AB631009B2D7C /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2A5418296AB631009B2D7C /* NotificationService.swift */; };
@ -98,6 +96,7 @@
9FE3DB57296FEFCA00628CB0 /* AppAccount in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE3DB56296FEFCA00628CB0 /* AppAccount */; };
9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; platformFilters = (ios, maccatalyst, ); productRef = 9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */; };
9FE4CCAD2B4C849F00DA5F13 /* GiphyUISDK in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE4CCAC2B4C849F00DA5F13 /* GiphyUISDK */; };
9FE6A42E2BD043A90055D388 /* RevenueCat in Frameworks */ = {isa = PBXBuildFile; productRef = 9FE6A42D2BD043A90055D388 /* RevenueCat */; };
9FFF677C299B7B2C00FE700A /* Notifications in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677B299B7B2C00FE700A /* Notifications */; };
9FFF6780299B7D2B00FE700A /* DesignSystem in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF677F299B7D2B00FE700A /* DesignSystem */; };
9FFF6782299B7D3A00FE700A /* Account in Frameworks */ = {isa = PBXBuildFile; productRef = 9FFF6781299B7D3A00FE700A /* Account */; };
@ -300,7 +299,6 @@
9F7335EF29674F7100AFF0BA /* QuickLook.framework in Frameworks */,
9FE4CCAB2B4C848A00DA5F13 /* GiphyUISDK in Frameworks */,
9F7335ED2967463400AFF0BA /* AVKit.framework in Frameworks */,
9F2A540C29699705009B2D7C /* RevenueCat in Frameworks */,
9F2A540E2969A0B0009B2D7C /* StoreKit.framework in Frameworks */,
9F55C6902955993C00F94077 /* Explore in Frameworks */,
9FAE4ACE29379A5A00772766 /* KeychainSwift in Frameworks */,
@ -311,8 +309,8 @@
9FD542E72962D2FF0045321A /* Lists in Frameworks */,
9F398AAB2935FFDB00A889F2 /* Models in Frameworks */,
9F5E581929545BE700A53960 /* Env in Frameworks */,
9F2A540A29699705009B2D7C /* ReceiptParser in Frameworks */,
DA0B24FB2A6876D50045BDD7 /* SFSafeSymbols in Frameworks */,
9FE6A42E2BD043A90055D388 /* RevenueCat in Frameworks */,
9F295540292B6C3400E0E81B /* Timeline in Frameworks */,
9F35DB4A29506FA100B3281A /* Notifications in Frameworks */,
9FC2A38B2B49D19A00DFD1C1 /* StatusKit in Frameworks */,
@ -644,12 +642,11 @@
9F55C68F2955993C00F94077 /* Explore */,
9FD542E62962D2FF0045321A /* Lists */,
9F7335E92966B3F800AFF0BA /* Conversations */,
9F2A540929699705009B2D7C /* ReceiptParser */,
9F2A540B29699705009B2D7C /* RevenueCat */,
9FE3DB56296FEFCA00628CB0 /* AppAccount */,
DA0B24FA2A6876D50045BDD7 /* SFSafeSymbols */,
9FC2A38A2B49D19A00DFD1C1 /* StatusKit */,
9FE4CCAA2B4C848A00DA5F13 /* GiphyUISDK */,
9FE6A42D2BD043A90055D388 /* RevenueCat */,
);
productName = IceCubesApp;
productReference = 9FBFE639292A715500C250E9 /* Ice Cubes.app */;
@ -728,9 +725,9 @@
mainGroup = 9FBFE630292A715500C250E9;
packageReferences = (
9FAE4ACC29379A5A00772766 /* XCRemoteSwiftPackageReference "keychain-swift" */,
9F2A540829699705009B2D7C /* XCRemoteSwiftPackageReference "purchases-ios" */,
DA0B24F92A6876D40045BDD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */,
9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */,
9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */,
);
productRefGroup = 9FBFE63A292A715500C250E9 /* Products */;
projectDirPath = "";
@ -1417,14 +1414,6 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
9F2A540829699705009B2D7C /* XCRemoteSwiftPackageReference "purchases-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/RevenueCat/purchases-ios.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.0.0;
};
};
9FAE4ACC29379A5A00772766 /* XCRemoteSwiftPackageReference "keychain-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/evgenyneu/keychain-swift";
@ -1438,7 +1427,15 @@
repositoryURL = "https://github.com/Giphy/giphy-ios-sdk";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.2.7;
minimumVersion = 2.2.8;
};
};
9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/RevenueCat/purchases-ios";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.40.1;
};
};
DA0B24F92A6876D40045BDD7 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */ = {
@ -1456,16 +1453,6 @@
isa = XCSwiftPackageProductDependency;
productName = Timeline;
};
9F2A540929699705009B2D7C /* ReceiptParser */ = {
isa = XCSwiftPackageProductDependency;
package = 9F2A540829699705009B2D7C /* XCRemoteSwiftPackageReference "purchases-ios" */;
productName = ReceiptParser;
};
9F2A540B29699705009B2D7C /* RevenueCat */ = {
isa = XCSwiftPackageProductDependency;
package = 9F2A540829699705009B2D7C /* XCRemoteSwiftPackageReference "purchases-ios" */;
productName = RevenueCat;
};
9F2A5423296AB67A009B2D7C /* Env */ = {
isa = XCSwiftPackageProductDependency;
productName = Env;
@ -1571,6 +1558,11 @@
package = 9FE4CCA92B4C848A00DA5F13 /* XCRemoteSwiftPackageReference "giphy-ios-sdk" */;
productName = GiphyUISDK;
};
9FE6A42D2BD043A90055D388 /* RevenueCat */ = {
isa = XCSwiftPackageProductDependency;
package = 9FE6A42C2BD043A80055D388 /* XCRemoteSwiftPackageReference "purchases-ios" */;
productName = RevenueCat;
};
9FFF677B299B7B2C00FE700A /* Notifications */ = {
isa = XCSwiftPackageProductDependency;
productName = Notifications;

View file

@ -75,10 +75,10 @@
{
"identity" : "purchases-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/RevenueCat/purchases-ios.git",
"location" : "https://github.com/RevenueCat/purchases-ios",
"state" : {
"revision" : "b3597e0aa5e1193b04d9e1ff04eaf5cab3b8737d",
"version" : "4.34.0"
"revision" : "a9763ca482d52ea3d59aa2dfd2fc23427b02dada",
"version" : "4.40.1"
}
},
{

View file

@ -1,6 +1,126 @@
{
"sourceLanguage" : "en",
"strings" : {
"action.cancel" : {
"comment" : "MARK: Common strings",
"extractionState" : "stale",
"localizations" : {
"be" : {
"stringUnit" : {
"state" : "translated",
"value" : "Скасаваць"
}
},
"ca" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancel·la"
}
},
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Abbrechen"
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancel"
}
},
"en-GB" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancel"
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancelar"
}
},
"eu" : {
"stringUnit" : {
"state" : "translated",
"value" : "Utzi"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Annuler"
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "Annulla"
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "キャンセル"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "취소"
}
},
"nb" : {
"stringUnit" : {
"state" : "translated",
"value" : "Avbryt"
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Annuleer"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Anuluj"
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Cancelar"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "İptal Et"
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
"value" : "Відміна"
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "取消"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "取消"
}
}
}
},
"" : {
"localizations" : {
"be" : {

View file

@ -171,6 +171,16 @@ public enum SheetDestination: Identifiable, Hashable {
await navigateToAccountFrom(acct: acct, url: url)
}
return .handled
} else if let client,
client.isAuth,
client.hasConnection(with: url),
let id = Int(url.lastPathComponent) {
if url.absoluteString.contains(client.server) {
navigate(to: .statusDetail(id: String(id)))
} else {
navigate(to: .remoteStatusDetail(url: url))
}
return .handled
}
return urlHandler?(url) ?? .systemAction
}

View file

@ -83,33 +83,33 @@ public struct StatusRowView: View {
viewModel.navigateToAccountDetail(account: viewModel.finalStatus.account)
}
}
VStack(alignment: .leading, spacing: .statusComponentSpacing) {
if !isCompact {
StatusRowHeaderView(viewModel: viewModel)
if !isCompact {
StatusRowHeaderView(viewModel: viewModel)
}
}
VStack(alignment: .leading, spacing: .statusComponentSpacing) {
StatusRowContentView(viewModel: viewModel)
.contentShape(Rectangle())
.onTapGesture {
guard !isFocused else { return }
viewModel.navigateToDetail()
}
StatusRowContentView(viewModel: viewModel)
.contentShape(Rectangle())
.onTapGesture {
guard !isFocused else { return }
viewModel.navigateToDetail()
.accessibilityActions {
if isFocused, viewModel.showActions {
accessibilityActions
}
.accessibilityActions {
if isFocused, viewModel.showActions {
accessibilityActions
}
}
if !reasons.contains(.placeholder),
viewModel.showActions, isFocused || theme.statusActionsDisplay != .none,
!isInCaptureMode
{
StatusRowActionsView(isBlockConfirmationPresented: $isBlockConfirmationPresented,
viewModel: viewModel)
.tint(isFocused ? theme.tintColor : .gray)
}
if !reasons.contains(.placeholder),
viewModel.showActions, isFocused || theme.statusActionsDisplay != .none,
!isInCaptureMode
{
StatusRowActionsView(isBlockConfirmationPresented: $isBlockConfirmationPresented,
viewModel: viewModel)
.tint(isFocused ? theme.tintColor : .gray)
}
if isFocused, !isCompact {
StatusRowDetailView(viewModel: viewModel)
}
if isFocused, !isCompact {
StatusRowDetailView(viewModel: viewModel)
}
}
}

View file

@ -54,6 +54,7 @@ public struct StatusRowMediaPreviewView: View {
: CGSize(width: imageMaxHeight, height: imageMaxHeight),
sensitive: sensitive
)
.padding(.horizontal, .layoutPadding)
.accessibilityElement(children: .ignore)
.accessibilityLabel(Self.accessibilityLabel(for: attachments[0]))
.accessibilityAddTraits([.isButton, .isImage])
@ -66,10 +67,11 @@ public struct StatusRowMediaPreviewView: View {
}
}
.padding(.bottom, scrollBottomPadding)
.padding(.horizontal, .layoutPadding)
}
.scrollClipDisabled()
}
}
.padding(.horizontal, -1 * .layoutPadding)
}
@ViewBuilder