Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete_chats_of_all_exited_groups method was created in groups.py #82

Merged
merged 3 commits into from
Oct 30, 2021

Conversation

ghostrider22
Copy link
Contributor

@ghostrider22 ghostrider22 commented Oct 25, 2021

There was no way to differentiate groups and normal chat, therefore, I was forced to scroll through entire list of contacts, where it checks for the message "You can't send messages to this group because you're no longer a participant", if message is found then it deletes the group. Now, if we allow the program to run freely without any time.sleep() it scrolls through entire list of contact without finding any match, _wait_for_presence_of_an_element was also not working so to reduce its speed I had used sleep(0.5).
There was another problem, when delete chat is successful, program losts track of which contact or group should be clicked next. So, we have to scroll from top again, But since we have already checked top few contacts, I added count variable which contains number of chats checked so far, so that it quickly scrolls through those number of chats quickly without waiting for 0.5seconds, and then continues it search again.

Constants file didn't contain any delete group button selector, so I have added GROUPS__DELETE_GROUP selector.

@NavpreetDevpuri
Copy link
Member

It is working fine without sleep()

@NavpreetDevpuri NavpreetDevpuri merged commit 95bb66a into Tithibots:main Oct 30, 2021
@NavpreetDevpuri NavpreetDevpuri linked an issue Oct 31, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create delete_chats_of_all_exited_groups() in groups.py
2 participants