From c2f7d14b67395a98ab4eec2184c41c5f749242e0 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 9 Mar 2024 14:21:47 +0100 Subject: [PATCH] fix: account selecting --- GramAddict/core/resources.py | 1 + GramAddict/core/views.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GramAddict/core/resources.py b/GramAddict/core/resources.py index 7d731592..af31e55d 100644 --- a/GramAddict/core/resources.py +++ b/GramAddict/core/resources.py @@ -182,6 +182,7 @@ def __init__(self, APP_ID): self.UNIFIED_FOLLOW_LIST_TAB_LAYOUT = ( f"{APP_ID}:id/unified_follow_list_tab_layout" ) + self.USERNAME_TEXTVIEW = f"{APP_ID}:id/username_textview" self.VIDEO_CONTAINER = f"{APP_ID}:id/video_container" self.VIEW_PLAY_BUTTON = f"{APP_ID}:id/view_play_button" self.ZOOMABLE_VIEW_CONTAINER = f"{APP_ID}:id/zoomable_view_container" diff --git a/GramAddict/core/views.py b/GramAddict/core/views.py index e91f77a3..6dcda336 100644 --- a/GramAddict/core/views.py +++ b/GramAddict/core/views.py @@ -1080,7 +1080,7 @@ def changeToUsername(self, username: str): def _find_username(self, username, has_scrolled=False): list_view = self.device.find(resourceId=ResourceID.LIST) username_obj = self.device.find( - resourceId=ResourceID.ROW_USER_TEXTVIEW, + resourceIdMatches=f"{ResourceID.ROW_USER_TEXTVIEW}|{ResourceID.USERNAME_TEXTVIEW}", textMatches=case_insensitive_re(username), ) if username_obj.exists(Timeout.SHORT):