diff --git a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate
index d3d482f..ad9865f 100644
Binary files a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate and b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index c1b52b5..9359d05 100644
--- a/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/Vendoo.xcworkspace/xcuserdata/okechi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -58,12 +58,26 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Vendoo/HomeViewController.swift"
- timestampString = "494847768.56364"
+ timestampString = "494906385.49118"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "182"
- endingLineNumber = "182"
- landmarkName = "listingHasEnded(_:ebayInfo:amazonInfo:etsyInfo:)"
+ startingLineNumber = "183"
+ endingLineNumber = "183">
+
+
+
+
@@ -73,15 +87,445 @@
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
- filePath = "Vendoo/ListingPreviewViewController.swift"
- timestampString = "494852405.460243"
+ filePath = "Vendoo/CategoryPopUpController.swift"
+ timestampString = "494896911.735111"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "146"
- endingLineNumber = "146"
+ startingLineNumber = "41"
+ endingLineNumber = "41"
+ landmarkName = "loadCategories(_:selectedCatCompletion:)"
+ landmarkType = "5">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Vendoo/CategoriesTableViewController.swift b/Vendoo/CategoriesTableViewController.swift
index 14f1738..027d126 100644
--- a/Vendoo/CategoriesTableViewController.swift
+++ b/Vendoo/CategoriesTableViewController.swift
@@ -129,6 +129,7 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
dispatch_async(dispatch_get_main_queue(), {
+
cell.categoryName.text = self.categories[indexPath.row]
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 3, inSection: 0))?.hidden = true //facebook
cell.networks.cellForItemAtIndexPath(NSIndexPath(forRow: 2, inSection: 0))?.hidden = true //etsy
@@ -693,9 +694,14 @@ class CategoriesTableViewController: UIViewController, UITableViewDelegate, UITa
}
let cell: CategoryCell! = tableView.cellForRowAtIndexPath(indexPath) as! CategoryCell//tableView.dequeueReusableCellWithIdentifier("CategoryCell", forIndexPath: indexPath) as? CategoryCell
- if(self.ebayManager.isAuthorized && cell.shouldAskAboutLeafCategories){
- self.potentialEbay = true
- self.navigateCategories()
+
+ if(self.ebayManager.isAuthorized ) {
+ var dict: Dictionary> = (EbayWebServiceManager.settingsDictionary["categories"]!) as! Dictionary>
+ let catDict = dict[self.selectedCategory]
+ if (!(catDict!["isLeaf"] as! Bool)){
+ self.potentialEbay = true
+ self.navigateCategories()
+ }
}
else {
self.performSegueWithIdentifier("NetworkSelectionSegue", sender: self)
diff --git a/Vendoo/EbayWebServiceManager.swift b/Vendoo/EbayWebServiceManager.swift
index 03b2bda..a9f0979 100644
--- a/Vendoo/EbayWebServiceManager.swift
+++ b/Vendoo/EbayWebServiceManager.swift
@@ -506,6 +506,7 @@ extension EbayWebServiceManager: NSXMLParserDelegate {
dict[string] = ["cat_id": self.catID, "isLeaf": false, "level": self.catLevel]
EbayWebServiceManager.settingsDictionary["categories"] = dict
NSUserDefaults.standardUserDefaults().setObject(EbayWebServiceManager.settingsDictionary, forKey: "ebaySettings")
+
}
else {
if "\(self.catDetailLevel)" == self.catLevel {
diff --git a/Vendoo/FacebookGraphAPIManager.swift b/Vendoo/FacebookGraphAPIManager.swift
index 1355b78..d86b931 100644
--- a/Vendoo/FacebookGraphAPIManager.swift
+++ b/Vendoo/FacebookGraphAPIManager.swift
@@ -90,6 +90,7 @@ extension FacebookGraphAPIManager {
print(result.token)
print(result.grantedPermissions)
NSUserDefaults.standardUserDefaults().setBool(true, forKey:"fbAuthorized")
+ self.isAuthorized = true
FBSDKAccessToken.setCurrentAccessToken(result.token)
@@ -103,6 +104,10 @@ extension FacebookGraphAPIManager {
(result, error) -> Void in
NSLog("Logged in with publish permisions")
+ NSUserDefaults.standardUserDefaults().setBool(true, forKey:"fbAuthorized")
+ self.isAuthorized = true
+
+
})
})
diff --git a/Vendoo/ListingPreviewViewController.swift b/Vendoo/ListingPreviewViewController.swift
index b6fd7a3..e366f3e 100644
--- a/Vendoo/ListingPreviewViewController.swift
+++ b/Vendoo/ListingPreviewViewController.swift
@@ -190,7 +190,7 @@ extension ListingPreviewViewController {
self.view.addSubview(loadingView)
self.firManager.indicator.startAnimating()
- if(self.itemPicture.image == nil){
+ if(self.itemPictureMain.image == nil){
let alert = UIAlertController(title: "Image Needed", message: "To proceed to choose networks, you must supply at least one picture for your listing", preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in alert.dismissViewControllerAnimated(true, completion: nil)}))
@@ -634,28 +634,20 @@ extension ListingPreviewViewController {
// self.alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in self.alert.dismissViewControllerAnimated(true, completion: nil)}))
- //register new listing id in global path of firebase root'
- self.firManager.ref.child("Global_listings").child(newListingRef.key).setValue(newListingRef.key)
})
})
})
- })
-
- }
+ }
}
@IBAction func editListing(sender: AnyObject) {
self.performSegueWithIdentifier("EditListingSegue", sender: self)
}
-
-
-
-
- }
+}
extension ListingPreviewViewController: UICollectionViewDelegate {
/*