Skip to content

Commit de9bb7c

Browse files
committed
Merge branch 'release/1.0.0-beta.2'
2 parents 4cd65ee + 5970628 commit de9bb7c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

hackfoldr-iOS/MainViewController.m

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ - (NSString *)hackfoldrPageKey
8181

8282
if (!pageKey || pageKey.length == 0) {
8383
NSString *defaultPage = @"hackfoldr-iOS";
84-
#if DEBUG
85-
defaultPage = @"welcome-to-hackfoldr";
86-
#endif
8784

8885
[[NSUserDefaults standardUserDefaults] setDefaultHackfoldrPage:defaultPage];
8986
[[NSUserDefaults standardUserDefaults] synchronize];
@@ -175,12 +172,27 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
175172

176173
#pragma mark - Actions
177174

178-
- (void)showListViewController {
175+
- (void)showListViewController
176+
{
177+
// When List view is showed, don't show again
178+
for (UIViewController *vc in self.navigationController.viewControllers) {
179+
if ([vc isKindOfClass:[self.listViewController class]]) {
180+
return;
181+
}
182+
}
183+
179184
[self.navigationController pushViewController:self.listViewController animated:YES];
180185
}
181186

182187
- (void)showSettingViewController
183188
{
189+
// When Setting view is showed, don't show again
190+
for (QuickDialogController *vc in self.navigationController.viewControllers) {
191+
if ([vc isKindOfClass:[QuickDialogController class]]) {
192+
return;
193+
}
194+
}
195+
184196
QRootElement *settingRoot = [[QRootElement alloc] init];
185197
settingRoot.title = NSLocalizedStringFromTable(@"Change Hackfoldr Page", @"Hackfoldr", @"Title of SettingView");
186198
settingRoot.grouped = YES;

0 commit comments

Comments
 (0)