mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing page bug when loading app and selecting page that's not the first story.
This commit is contained in:
parent
cf75462daf
commit
51e25cf051
7 changed files with 13 additions and 7 deletions
|
@ -1473,6 +1473,7 @@
|
||||||
if (activeStoryLocation >= 0) {
|
if (activeStoryLocation >= 0) {
|
||||||
BOOL animated = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad &&
|
BOOL animated = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad &&
|
||||||
!self.tryFeedCategory);
|
!self.tryFeedCategory);
|
||||||
|
[self.storyPageControl view];
|
||||||
[self.storyPageControl changePage:activeStoryLocation animated:animated];
|
[self.storyPageControl changePage:activeStoryLocation animated:animated];
|
||||||
[self.storyPageControl animateIntoPlace:YES];
|
[self.storyPageControl animateIntoPlace:YES];
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@
|
||||||
- (NSString *)activeStoryView {
|
- (NSString *)activeStoryView {
|
||||||
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
|
||||||
NSString *storyViewPref = [userPreferences stringForKey:[self storyViewKey]];
|
NSString *storyViewPref = [userPreferences stringForKey:[self storyViewKey]];
|
||||||
NSLog(@"Story pref: %@ (%d)", storyViewPref, self.isRiverView);
|
// NSLog(@"Story pref: %@ (%d)", storyViewPref, self.isRiverView);
|
||||||
if (storyViewPref) {
|
if (storyViewPref) {
|
||||||
return storyViewPref;
|
return storyViewPref;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (NSString *)description {
|
||||||
|
NSString *page = appDelegate.storyPageControl.currentPage == self ? @"currentPage" : appDelegate.storyPageControl.previousPage == self ? @"previousPage" : appDelegate.storyPageControl.nextPage == self ? @"nextPage" : @"unattached page";
|
||||||
|
return [NSString stringWithFormat:@"%@", page];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
|
|
||||||
|
|
|
@ -547,7 +547,7 @@
|
||||||
|
|
||||||
NSInteger wasIndex = pageController.pageIndex;
|
NSInteger wasIndex = pageController.pageIndex;
|
||||||
pageController.pageIndex = newIndex;
|
pageController.pageIndex = newIndex;
|
||||||
NSLog(@"Applied Index: Was %ld, now %ld (%ld/%ld/%ld) [%lu stories - %d] %@", (long)wasIndex, (long)newIndex, (long)previousPage.pageIndex, (long)currentPage.pageIndex, (long)nextPage.pageIndex, (unsigned long)[appDelegate.storiesCollection.activeFeedStoryLocations count], outOfBounds, NSStringFromCGRect(self.scrollView.frame));
|
// NSLog(@"Applied Index to %@: Was %ld, now %ld (%ld/%ld/%ld) [%lu stories - %d] %@", pageController, (long)wasIndex, (long)newIndex, (long)previousPage.pageIndex, (long)currentPage.pageIndex, (long)nextPage.pageIndex, (unsigned long)[appDelegate.storiesCollection.activeFeedStoryLocations count], outOfBounds, NSStringFromCGRect(self.scrollView.frame));
|
||||||
|
|
||||||
if (newIndex > 0 && newIndex >= [appDelegate.storiesCollection.activeFeedStoryLocations count]) {
|
if (newIndex > 0 && newIndex >= [appDelegate.storiesCollection.activeFeedStoryLocations count]) {
|
||||||
pageController.pageIndex = -2;
|
pageController.pageIndex = -2;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14D87h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7531" systemVersion="14D131" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StoryPageControl">
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StoryPageControl">
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.6.4</string>
|
<string>4.7.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>48</string>
|
<string>49</string>
|
||||||
<key>FacebookAppID</key>
|
<key>FacebookAppID</key>
|
||||||
<string>230426707030569</string>
|
<string>230426707030569</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#import <SystemConfiguration/SystemConfiguration.h>
|
#import <SystemConfiguration/SystemConfiguration.h>
|
||||||
#import <MobileCoreServices/MobileCoreServices.h>
|
#import <MobileCoreServices/MobileCoreServices.h>
|
||||||
|
|
||||||
//#define DEBUG 1
|
#define DEBUG 1
|
||||||
//#define PROD_DEBUG 1
|
//#define PROD_DEBUG 1
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Loading…
Add table
Reference in a new issue