mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
#1597 (account deletion)
- Added a Delete Account button to the bottom of Preferences. - Enhanced Preferences to make the button red. - Tapping it dismisses Prrefs and shows the delete account web page. - I created a “dejaldeletetest” account, then deleted it, to confirm it works.
This commit is contained in:
parent
4b0f469af5
commit
c5e4e2a740
7 changed files with 49 additions and 2 deletions
|
|
@ -1344,6 +1344,13 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
|
|||
[ImportExportPreferences importFromController:sender];
|
||||
} else if ([specifier.key isEqualToString:@"export_prefs"]) {
|
||||
[ImportExportPreferences exportFromController:sender];
|
||||
} else if ([specifier.key isEqualToString:@"delete_account"]) {
|
||||
[sender dismiss:nil];
|
||||
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@/profile/delete_account",
|
||||
self.appDelegate.url];
|
||||
|
||||
[self.appDelegate showInAppBrowser:[NSURL URLWithString:urlString] withCustomTitle:@"Delete Account" fromSender:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -652,9 +652,11 @@ CGRect IASKCGRectSwap(CGRect rect);
|
|||
cell.textLabel.text = ([value isKindOfClass:NSString.class] && [self.settingsReader titleForId:value].length) ? [self.settingsReader titleForId:value] : specifier.title;
|
||||
cell.detailTextLabel.text = specifier.subtitle;
|
||||
IASK_IF_IOS7_OR_GREATER
|
||||
(if (specifier.textAlignment != NSTextAlignmentLeft) {
|
||||
(if (specifier.isCritical) {
|
||||
cell.textLabel.textColor = UIColor.redColor;
|
||||
} else if (specifier.textAlignment != NSTextAlignmentLeft) {
|
||||
cell.textLabel.textColor = tableView.tintColor;
|
||||
});
|
||||
});
|
||||
cell.textLabel.textAlignment = specifier.textAlignment;
|
||||
cell.accessoryType = (specifier.textAlignment == NSTextAlignmentLeft) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;
|
||||
} else if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#define kIASKType @"Type"
|
||||
#define kIASKTitle @"Title"
|
||||
#define kIASKFooterText @"FooterText"
|
||||
#define kIASKIsCritical @"IsCritical"
|
||||
#define kIASKKey @"Key"
|
||||
#define kIASKFile @"File"
|
||||
#define kIASKDefaultValue @"DefaultValue"
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
- (UITextAutocapitalizationType)autocapitalizationType;
|
||||
- (UITextAutocorrectionType)autoCorrectionType;
|
||||
- (NSString*)footerText;
|
||||
- (BOOL)isCritical;
|
||||
- (Class)viewControllerClass;
|
||||
- (SEL)viewControllerSelector;
|
||||
- (NSString*)viewControllerStoryBoardFile;
|
||||
|
|
|
|||
|
|
@ -172,6 +172,10 @@
|
|||
return [self localizedObjectForKey:kIASKFooterText];
|
||||
}
|
||||
|
||||
- (BOOL)isCritical {
|
||||
return [[_specifierDict objectForKey:kIASKIsCritical] boolValue];
|
||||
}
|
||||
|
||||
- (Class)viewControllerClass {
|
||||
// DJS: Commented out this to avoid UIWebView. Not used by NewsBlur.
|
||||
// [IASKAppSettingsWebViewController class]; // make sure this is linked into the binary/library
|
||||
|
|
|
|||
|
|
@ -952,6 +952,22 @@
|
|||
<key>IASKTextAlignment</key>
|
||||
<string>IASKUITextAlignmentCenter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
<key>IsCritical</key>
|
||||
<true/>
|
||||
<key>Title</key>
|
||||
<string>Delete Account</string>
|
||||
<key>Key</key>
|
||||
<string>delete_account</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
|
|
|
|||
|
|
@ -1020,6 +1020,22 @@
|
|||
<key>IASKTextAlignment</key>
|
||||
<string>IASKUITextAlignmentCenter</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>IASKButtonSpecifier</string>
|
||||
<key>IsCritical</key>
|
||||
<true/>
|
||||
<key>Title</key>
|
||||
<string>Delete Account</string>
|
||||
<key>Key</key>
|
||||
<string>delete_account</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue