def noteNewMessage(self, window): if not NSApp.isActive(): self.missedChats += 1 self.updateDockTile()