Fix for records list
This commit is contained in:
parent
1ab4de19e0
commit
7a97d3dcb5
@ -8,7 +8,7 @@
|
|||||||
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "C14D0996-5708-44D2-A6BA-4A4B50B522EE"
|
uuid = "C14D0996-5708-44D2-A6BA-4A4B50B522EE"
|
||||||
shouldBeEnabled = "Yes"
|
shouldBeEnabled = "No"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No">
|
continueAfterRunningActions = "No">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
|
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
|
||||||
<BreakpointContent
|
<BreakpointContent
|
||||||
uuid = "CF01B44D-372B-4C78-A197-7FDEC607CE0E"
|
uuid = "CF01B44D-372B-4C78-A197-7FDEC607CE0E"
|
||||||
shouldBeEnabled = "Yes"
|
shouldBeEnabled = "No"
|
||||||
ignoreCount = "0"
|
ignoreCount = "0"
|
||||||
continueAfterRunningActions = "No"
|
continueAfterRunningActions = "No"
|
||||||
scope = "1"
|
scope = "1"
|
||||||
@ -79,5 +79,21 @@
|
|||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "91C7B4B0-D2EE-413D-8DFC-FC9421FDC23A"
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "AutoCat/ThirdParty/IHProgressHUD/IHProgressHUD.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "989"
|
||||||
|
endingLineNumber = "989"
|
||||||
|
landmarkName = "set(containerView:)"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
</Breakpoints>
|
</Breakpoints>
|
||||||
</Bucket>
|
</Bucket>
|
||||||
|
|||||||
@ -14,21 +14,21 @@
|
|||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>3</integer>
|
<integer>2</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Eureka (Playground) 2.xcscheme</key>
|
<key>Eureka (Playground) 2.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>4</integer>
|
<integer>3</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Eureka (Playground).xcscheme</key>
|
<key>Eureka (Playground).xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>2</integer>
|
<integer>1</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>GettingStarted (Playground) 1.xcscheme</key>
|
<key>GettingStarted (Playground) 1.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
@ -70,42 +70,42 @@
|
|||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>10</integer>
|
<integer>8</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Rx (Playground) 1.xcscheme</key>
|
<key>Rx (Playground) 1.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>6</integer>
|
<integer>5</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Rx (Playground) 2.xcscheme</key>
|
<key>Rx (Playground) 2.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>7</integer>
|
<integer>6</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>Rx (Playground).xcscheme</key>
|
<key>Rx (Playground).xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>5</integer>
|
<integer>4</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SwiftDate (Playground) 1.xcscheme</key>
|
<key>SwiftDate (Playground) 1.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>8</integer>
|
<integer>9</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SwiftDate (Playground) 2.xcscheme</key>
|
<key>SwiftDate (Playground) 2.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>9</integer>
|
<integer>10</integer>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SwiftDate (Playground) 3.xcscheme</key>
|
<key>SwiftDate (Playground) 3.xcscheme</key>
|
||||||
<dict>
|
<dict>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<key>isShown</key>
|
<key>isShown</key>
|
||||||
<false/>
|
<false/>
|
||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>1</integer>
|
<integer>7</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SuppressBuildableAutocreation</key>
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
|||||||
@ -98,8 +98,8 @@ class CheckController: UIViewController, UITableViewDelegate, UITextFieldDelegat
|
|||||||
self.number.resignFirstResponder()
|
self.number.resignFirstResponder()
|
||||||
self.number.text = nil
|
self.number.text = nil
|
||||||
self.check.isEnabled = false
|
self.check.isEnabled = false
|
||||||
IHProgressHUD.show()
|
|
||||||
|
|
||||||
|
IHProgressHUD.show()
|
||||||
self.check(number: numberNormalized, action: .receiveAndSend).subscribe { vehicle in
|
self.check(number: numberNormalized, action: .receiveAndSend).subscribe { vehicle in
|
||||||
self.updateDetailController(with: vehicle)
|
self.updateDetailController(with: vehicle)
|
||||||
IHProgressHUD.dismiss()
|
IHProgressHUD.dismiss()
|
||||||
|
|||||||
@ -881,6 +881,11 @@ public class IHProgressHUD : UIView {
|
|||||||
windowLevelSupported = win.windowLevel >= UIWindow.Level.normal && win.windowLevel <= maxSupportedWindowLevel
|
windowLevelSupported = win.windowLevel >= UIWindow.Level.normal && win.windowLevel <= maxSupportedWindowLevel
|
||||||
|
|
||||||
let windowKeyWindow = win.isKeyWindow
|
let windowKeyWindow = win.isKeyWindow
|
||||||
|
print("=====================================")
|
||||||
|
print("windowOnMainScreen: \(windowOnMainScreen)")
|
||||||
|
print("windowIsVisible: \(windowIsVisible)")
|
||||||
|
print("windowLevelSupported: \(windowLevelSupported)")
|
||||||
|
print("windowKeyWindow: \(windowKeyWindow)")
|
||||||
|
|
||||||
if windowOnMainScreen && windowIsVisible && windowLevelSupported && windowKeyWindow {
|
if windowOnMainScreen && windowIsVisible && windowLevelSupported && windowKeyWindow {
|
||||||
return win
|
return win
|
||||||
|
|||||||
@ -22,17 +22,19 @@ class RealmSectionedDataSource<Item,Cell>: NSObject, UITableViewDataSource where
|
|||||||
case .initial:
|
case .initial:
|
||||||
self.sections = self.data.groupedByDate()
|
self.sections = self.data.groupedByDate()
|
||||||
self.tv.reloadData()
|
self.tv.reloadData()
|
||||||
case .update(_, let deletions, let insertions, let modifications):
|
case .update(_, let deletions, let insertions, let modifications):
|
||||||
print("Deletions: \(deletions.count), Insertions: \(insertions.count), Modifications: \(modifications.count)")
|
|
||||||
let newSections = self.data.groupedByDate()
|
|
||||||
let diff = newSections.difference(from: self.sections)
|
|
||||||
|
|
||||||
self.tv.beginUpdates()
|
self.tv.beginUpdates()
|
||||||
let delPaths = deletions.map(self.indexPath)
|
let delPaths = deletions.map(self.indexPath)
|
||||||
self.tv.deleteRows(at: delPaths, with: .automatic)
|
self.tv.deleteRows(at: deletions.map(self.indexPath), with: .automatic)
|
||||||
//diff.filter { if case .remove = $0 }
|
if let delPath = delPaths.first, self.sections[delPath.section].items.count == 1 {
|
||||||
|
self.tv.deleteSections(IndexSet(integer: delPath.section), with: .automatic)
|
||||||
|
}
|
||||||
self.sections = self.data.groupedByDate()
|
self.sections = self.data.groupedByDate()
|
||||||
self.tv.insertRows(at: insertions.map(self.indexPath), with: .automatic)
|
let insPaths = insertions.map(self.indexPath)
|
||||||
|
if let insPath = insPaths.first, self.sections[insPath.section].items.count == 1 {
|
||||||
|
self.tv.insertSections(IndexSet(integer: insPath.section), with: .automatic)
|
||||||
|
}
|
||||||
|
self.tv.insertRows(at: insPaths, with: .automatic)
|
||||||
self.tv.reloadRows(at: modifications.map(self.indexPath), with: .automatic)
|
self.tv.reloadRows(at: modifications.map(self.indexPath), with: .automatic)
|
||||||
self.tv.endUpdates()
|
self.tv.endUpdates()
|
||||||
case .error(let err):
|
case .error(let err):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user