Skip to content

Commit

Permalink
fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lbk2907 committed Jun 23, 2022
1 parent ed84029 commit 3c516a2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions addon/appModules/whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ def configFile(self):

# Function that receives the UIAAutomationId by parameter, and returns the match object
def get(self, id, errorMessage, gesture):
# for obj in api.getForegroundObject().children[1].children:
# if obj.UIAAutomationId == id:
# return obj#
fg = api.getForegroundObject().children[1]
for obj in fg.children:
for obj in api.getForegroundObject().children[1].children:
if obj.UIAAutomationId == id:
return obj
return obj#
if errorMessage:
message(self.notFound)
if gesture:
Expand Down Expand Up @@ -176,7 +172,7 @@ def script_backAndCloseButton(self, gesture):
)
def script_chatsList(self, gesture):
chatList = self.get('ChatList', False, None)
if ChatList:
if chatList:
chatList.firstChild.children[0].setFocus()
else:
message(self.notFound)
Expand Down

0 comments on commit 3c516a2

Please sign in to comment.