{"action":"opened","issue":{"url":"https://api.github.com/repos/opacapp/opacclient/issues/428","repository_url":"https://api.github.com/repos/opacapp/opacclient","labels_url":"https://api.github.com/repos/opacapp/opacclient/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/opacapp/opacclient/issues/428/comments","events_url":"https://api.github.com/repos/opacapp/opacclient/issues/428/events","html_url":"https://github.com/opacapp/opacclient/issues/428","id":161364585,"number":428,"title":"Snackbar for undoing removal of favorites","user":{"login":"johan12345","id":5310424,"avatar_url":"https://avatars.githubusercontent.com/u/5310424?v=3","gravatar_id":"","url":"https://api.github.com/users/johan12345","html_url":"https://github.com/johan12345","followers_url":"https://api.github.com/users/johan12345/followers","following_url":"https://api.github.com/users/johan12345/following{/other_user}","gists_url":"https://api.github.com/users/johan12345/gists{/gist_id}","starred_url":"https://api.github.com/users/johan12345/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johan12345/subscriptions","organizations_url":"https://api.github.com/users/johan12345/orgs","repos_url":"https://api.github.com/users/johan12345/repos","events_url":"https://api.github.com/users/johan12345/events{/privacy}","received_events_url":"https://api.github.com/users/johan12345/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opacapp/opacclient/labels/easy","name":"easy","color":"0e8a16"},{"url":"https://api.github.com/repos/opacapp/opacclient/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/opacapp/opacclient/labels/user%20interface","name":"user interface","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T07:13:43Z","updated_at":"2016-06-21T07:13:43Z","closed_at":null,"body":"**Hey!** If you ever wanted to contribute to an Open Source project, but didn't know how, you just found a perfect place to start. We try to write this issue as instructive as possible, but as we're humans we almost certainly forgot to write something important in here. If you want to try to tackle this issue and get stuck at *any* point, please do not hesitate and ask us, either here on GitHub or via email at info@opacapp.de. We'll be very happy to help! \r\n\r\nWe think this issue is very suitable to people who are just starting with Open Source or Android development in general and have never done it before. We'd like to ask people with wide experience in contributing to leave this issue to beginners. Thanks!\r\n\r\n## How to get started\r\n\r\nFirst of all, we recommend that you [install the app](https://play.google.com/store/apps/details?id=de.geeksfactory.opacclient) and play around with it so you know how it looks and feels. Next, you should use git to download this GitHub repository and open the folder ``opacclient/`` in Android Studio. Press the green \"Play\" button to run it on your device. If this works, you have a working development setup, yay! If it doesn't, feel free to ask us for help!\r\n\r\n## What this is about\r\n\r\nWhen you use the app to search for a book, you can save it to your favorites list, which is accessible through the navigation drawer. When you delete an item from the favorites list, it is currently directly deleted without any warning. We would like to provide the user with a [Snackbar](https://developer.android.com/reference/android/support/design/widget/Snackbar.html) that offers a button to undo removing the last item.\r\n\r\n## How to do this\r\n\r\nWe recommend forking this repository and creating a special git branch for this issue before you start. This will make it easier for you to submit a pull request later. If you've never done this before, there are a lot of good guides out there and you can always ask us questions.\r\n\r\n* Have a look at the `remove(Starred)` method in [StarredFragment.java](https://github.com/opacapp/opacclient/blob/master/opacclient/opacapp/src/main/java/de/geeksfactory/opacclient/frontend/StarredFragment.java#L177). This removes an item from the database.\r\n* Save the removed item in a new `private` field and show a Snackbar using [Snackbar.make](https://developer.android.com/reference/android/support/design/widget/Snackbar.html#make(android.view.View,%20int,%20int)), [setAction](https://developer.android.com/reference/android/support/design/widget/Snackbar.html#setAction(int,%20android.view.View.OnClickListener)) and [show](https://developer.android.com/reference/android/support/design/widget/Snackbar.html#show()). You need to add appropriate strings to [strings.xml](https://github.com/opacapp/opacclient/blob/master/opacclient/opacapp/src/main/res/values/strings.xml).\r\n* Implement the `OnClickListener` you set in `setAction` to re-add the removed item to the `StarDataSource`.\r\n\r\nWe're excited to see your pull request! \r\n\r\nIf you get stuck, don't hestitate to ask. We bound ourselves to a [Code of Conduct](https://github.com/opacapp/opacclient/blob/master/CODE_OF_CONDUCT.md) and we're committed to providing a welcoming experience and giving constructive, friendly and useful feedback on your contributions."}}
{"actor":{"display_login":"johan12345"}}