Przeglądaj źródła

Only scroll log view if new messages have arrived

This fixes a bug where being scrolled to the bottom of the system log screen would make the table view stutter repeatedly because it was trying to scroll to the bottom while already being at the bottom.
Tanner Bennett 8 lat temu
rodzic
commit
f5433153d0

+ 3 - 0
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

@@ -70,6 +70,9 @@
 {
     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
         NSArray<FLEXSystemLogMessage *> *newMessages = [self newLogMessagesForCurrentProcess];
+        if (!newMessages.count) {
+            return;
+        }
 
         dispatch_async(dispatch_get_main_queue(), ^{
             self.title = @"System Log";