Преглед на файлове

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 години
родител
ревизия
f5433153d0
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

+ 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";