Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Self-Destructing Message Android App Self-Destruction Deleting Partial Data for One Recipient

Why to use ids.remove?

At 0:45 Ben added "ids.remove(ParseUser.getCurrentUser().getObjectId())". I dont understand why He added it, if ids gets reasigned by the "message.getList(ParseConstants.KEY_RECIPIENT_IDS) each time."

1 Answer

Pablo Rocha
Pablo Rocha
10,142 Points

It does not appear that line of code is required. Like you said, ids is declared each time the code is executed. Perhaps if you had further work to perform with the list you would need to update ids, however, in this case we do not.