Code cleanup 04/168604/2
authorZofia Grzelewska <z.abramowska@samsung.com>
Mon, 29 Jan 2018 17:32:02 +0000 (18:32 +0100)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 23 Feb 2018 08:44:25 +0000 (08:44 +0000)
* Move common code after branches
* Use alias

Change-Id: I7676c94c88b7fb3e1d206f937068b92138348896

src/notification-daemon/Logic.cpp

index 1f7b846..4c11f14 100644 (file)
@@ -423,7 +423,7 @@ void Logic::popupResponse(NResponseType response) {
         // Privacy not allowed, request is denied
         processResponse(conn, clientResponse, level);
         finishCurrentRequest();
-        processEvents();
+
     } else {
         // Privacy allowed - check if more privacies are to process
         PrivaciesSequence &seq = m_eventToPrivaciesSeq[m_currentEvent];
@@ -434,14 +434,13 @@ void Logic::popupResponse(NResponseType response) {
             m_pendingEvents[0] = std::move(fdEvent);
             // don't call finishCurrentRequest here, because it will pop event, which we replaced
             m_currentEvent = EventId();
-            processEvents();
         } else {
             // No more privacies, request is allowed
-            processResponse(it->second, clientResponse, level);
+            processResponse(conn, clientResponse, level);
             finishCurrentRequest();
-            processEvents();
         }
     }
+    processEvents();
 }
 
 } // namespace Notification