Comments (6)
most of the people just download it and skip to like the photo which i think is very unfair woth photographers
from resplash.
@thisismultitaskingid A like button currently shows up if you sign into your Unsplash account in the navigation drawer. I can definitely look into adding something like double click to like also.
from resplash.
from resplash.
I don't have a lot of experience contributing actual code to open-source projects and although this is a pretty old issue I think that some people are still missing the feature. I'm pretty new to Android development but maybe this could be an approach to implementing the double-click to like feature: https://gist.github.com/Kenta1561/2d869cf2828d5d5cbbc19704011ef8f4
I know my test implementation is pretty rough atm but I hope at least it works as a conversation starter 😅
from resplash.
@Kenta1561 Your implementation actually looks pretty good to me. I know this has been a pretty long standing issue and I would like to get it done one day. The main thing that is holding me back is Google paging library (https://developer.android.com/topic/libraries/architecture/paging). Currently they don't allow data to be modified in the recyclerview/adapter after it has been loaded. So modifying the "like state" of a photo would not persist unless all the data gets reloaded. I would like to keep using the paging library since it does simplify things and has pretty good performance but is definitely a little restrictive right now. Let me know what you think.
from resplash.
So if I understand this correctly although an API request can be sent to like the photo upon a double tap by the user the Boolean liked_by_user
cannot be set to true because it would change the state of the object, right? The only workaround that would come to my mind rn would be to request the like state from the API when PhotoDetailActivity is launched which I guess is pretty inefficient...
Edit: If the state of the displayed objects can't be altered, isn't it a possible approach to store the likes in e.g. another list until the view is not shown anymore and then alter the like state?
from resplash.
Related Issues (20)
- [Feature Request] Add multiple sources to Auto Wallpaper HOT 4
- Resplash auto wallpaper related problem. HOT 3
- [Feature Request] dark overlay for wallpapers HOT 1
- Samsung fold4 issue
- [Feature Request] Personal sources other than Unsplash HOT 1
- [Feature Request] Account Backup HOT 3
- [Feature Request] set an exact time for auto change HOT 1
- Auto doesn't apply wallpaper to Lock screen in "Home screen & lock screen" HOT 7
- Auto wallpaper not working
- Stop repeating the same pictures when there are new ones to show HOT 3
- Is this to be implemented? Was looking for the exact same thing. I can of course wait until the specific time to change it and then set the duration to 24 hrs but if for example I change the choice of the wallpaper, it seems to reset the timer.
- Could you share the location of the Cache Files? HOT 2
- Notifications are not working HOT 3
- [Pro] Getting pro without Google play HOT 1
- A better widget design
- Can't download photos with its metadata.
- [Feature Request] Force Random Wallpaper Change
- Can't add Collections
- Unsplah + Collection HOT 2
- Add Blacklist tags for auto wallpaper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resplash.