Bump version, remove swipe action from user list

This commit is contained in:
Philipp Heckel 2022-06-11 20:41:33 -04:00
parent 0668635e10
commit 9d9ac85c62
5 changed files with 30 additions and 44 deletions

View file

@ -542,7 +542,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ntfy/ntfy.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"ntfy/Assets/Preview Content\"";
DEVELOPMENT_TEAM = YXQ4AMS4B4;
ENABLE_PREVIEWS = YES;
@ -559,7 +559,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
@ -576,7 +576,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = ntfy/ntfy.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"ntfy/Assets/Preview Content\"";
DEVELOPMENT_TEAM = YXQ4AMS4B4;
ENABLE_PREVIEWS = YES;
@ -593,7 +593,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
@ -607,7 +607,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ntfyNSE/ntfyNSE.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = YXQ4AMS4B4;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ntfyNSE/Info.plist;
@ -619,7 +619,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy.ntfyNSE;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -634,7 +634,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ntfyNSE/ntfyNSE.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = YXQ4AMS4B4;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = ntfyNSE/Info.plist;
@ -646,7 +646,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.2;
PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy.ntfyNSE;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;

View file

@ -2,13 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppBaseURL</key>
<string>$(APP_BASE_URL)</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>AppBaseURL</key>
<string>$(APP_BASE_URL)</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>

View file

@ -186,30 +186,29 @@ struct UserTableView: View {
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
// Sigh, for iOS 14 we need to add a "Delete" menu item, because it doesn't support
// swipe actions. Quite annoying.
if #available(iOS 15.0, *) {
Button(action: cancelAction) {
Text("Cancel")
if selectedUser == nil {
Button("Cancel") {
cancelAction()
}
} else {
if selectedUser == nil {
Menu {
Button("Cancel") {
cancelAction()
}
} else {
Menu {
Button("Cancel") {
cancelAction()
if #available(iOS 15.0, *) {
Button(role: .destructive) {
deleteAction()
} label: {
Text("Delete")
}
} else {
Button("Delete") {
deleteAction()
}
} label: {
Image(systemName: "ellipsis.circle")
.padding([.leading], 40)
}
} label: {
Image(systemName: "ellipsis.circle")
.padding([.leading], 40)
}
}
}
@ -276,21 +275,9 @@ struct UserRowView: View {
@ObservedObject var user: User
var body: some View {
if #available(iOS 15.0, *) {
userRow
.swipeActions(edge: .trailing) {
Button(role: .destructive) {
store.delete(user: user)
} label: {
Label("Delete", systemImage: "trash.circle")
}
}
} else {
userRow
}
}
private var userRow: some View {
// I tried to add a swipe action here to delete, but for some strange reason it doesn't work,
// even though in the subscription list it does.
HStack {
Image(systemName: "person.fill")
VStack(alignment: .leading, spacing: 0) {

View file

@ -18,7 +18,6 @@ struct SubscriptionAddView: View {
@State private var addError: String?
@State private var loginError: String?
private var subscriptionManager: SubscriptionManager {
return SubscriptionManager(store: store)
}
@ -45,7 +44,7 @@ struct SubscriptionAddView: View {
VStack(alignment: .leading, spacing: 0) {
Form {
Section(
footer: Text("Topics are not password protected, so choose a name that's not easy to guess. Once subscribed, you can PUT/POST notifications")
footer: Text("Topics may not be password-protected, so choose a name that's not easy to guess. Once subscribed, you can PUT/POST notifications")
) {
TextField("Topic name, e.g. phil_alerts", text: $topic)
.disableAutocapitalization()
@ -53,7 +52,7 @@ struct SubscriptionAddView: View {
}
Section(
footer:
(useAnother) ? Text("Support for self-hosted servers is currently limited. To ensure instant delivery, be sure to set upstream-base-url in your server's config, otherwise messages may arrive with significant delay. Auth is not yet supported.") : Text("")
(useAnother) ? Text("To ensure instant delivery from your self-hosted server, be sure to set upstream-base-url in your server's config, otherwise messages may arrive with significant delay.") : Text("")
) {
Toggle("Use another server", isOn: $useAnother)
if useAnother {

View file

@ -2,13 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppBaseURL</key>
<string>$(APP_BASE_URL)</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>AppBaseURL</key>
<string>$(APP_BASE_URL)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>