summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Juick/Main.storyboard8
-rw-r--r--Juick/Supporting Files/Juick-Info.plist2
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m17
3 files changed, 22 insertions, 5 deletions
diff --git a/Juick/Main.storyboard b/Juick/Main.storyboard
index 7936373..b717079 100644
--- a/Juick/Main.storyboard
+++ b/Juick/Main.storyboard
@@ -92,7 +92,7 @@
<toolbarItems>
<barButtonItem image="chats_icon" id="eaY-Yt-u9g">
<connections>
- <segue destination="vqF-gx-pZG" kind="push" id="D96-j8-t2e"/>
+ <action selector="filterAction:" destination="VCH-GK-jaH" id="m3s-pS-GdV"/>
</connections>
</barButtonItem>
<barButtonItem style="plain" systemItem="flexibleSpace" id="JhF-fJ-DQL"/>
@@ -103,7 +103,7 @@
</barButtonItem>
</toolbarItems>
<navigationItem key="navigationItem" id="M2f-nV-K0C">
- <barButtonItem key="rightBarButtonItem" image="profile_icon" style="plain" id="Sd1-hN-fdS">
+ <barButtonItem key="rightBarButtonItem" title="Item" image="settings_icon" style="plain" id="Sd1-hN-fdS">
<connections>
<segue destination="4g9-hM-bzq" kind="push" id="6ha-6h-L0E"/>
</connections>
@@ -309,9 +309,9 @@
<resources>
<image name="Splash.png" width="96" height="96"/>
<image name="chats_icon" width="20" height="22"/>
- <image name="profile_icon" width="16" height="20"/>
+ <image name="settings_icon" width="20" height="20"/>
</resources>
<inferredMetricsTieBreakers>
- <segue reference="gw8-QZ-Hrt"/>
+ <segue reference="vj1-M0-h6U"/>
</inferredMetricsTieBreakers>
</document>
diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist
index 2eb1c21..53c5301 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0.33</string>
+ <string>1.0.34</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index 9d7c43b..b0d965c 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -55,5 +55,22 @@ AppDelegate *appDelegate;
[threadVC setParams:[@{@"mid": mid } mutableCopy]];
}
}
+- (IBAction)filterAction:(id)sender {
+ UIAlertController *filterAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
+ [filterAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
+ [filterAlert addAction:[UIAlertAction actionWithTitle:@"My feed" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+ self.path = [APIClient feedUrl];
+ [self.messages removeAllObjects];
+ [self.tableView reloadData];
+ [self refreshData:NO];
+ }]];
+ [filterAlert addAction:[UIAlertAction actionWithTitle:@"Discover" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+ self.path = [APIClient messagesUrl];
+ [self.messages removeAllObjects];
+ [self.tableView reloadData];
+ [self refreshData:NO];
+ }]];
+ [self presentViewController:filterAlert animated:YES completion:nil];
+}
@end