Closed PedroC1999 closed 8 years ago
Auto save doesn't work that's what it was taken out
Yes I gathered that, but I think an effort should be made to concentrate on getting it to work on the received snaps - I am sure it's being working on but its an essential feature
I asked Marz about this before and he said it will be back but not in near future..They need to find better way for this
May sound stupid but making save button as big as the screen and making it disappear after you saved the snap, and then tapping again to see next snap would do the trick though, it could be done.
Couldn't you just compare the MD5 of a saved snap to the most recently saved snap in the saved snaps folder to check and see if it's a duplicate? What exactly is the issue here?
Guys he will get to it when he gets to it. If he decides to. If not then use the other options. If you dont like it then by all means make something yourself that will do it.
@Taconut GLHF comparing every single image of a folder which contains thousands of Images.
Autosave on stories is annoying since there's a billion images at once. It was fine for received snaps. On Stories, it would only save odd-numbered snaps.
Also, +1 for gaming lingo to marz.
@marzika The right way to address this kind of issue is usually to store a (hash, image path)
pair in database for each image that is known to be saved (i.e. that has been previously saved or that you are saving). The hash would be a checksum of the image and should probably rely on some fast and non-cryptographic hashing algorithm. Once you calculate the image hash, you reduce the amount of images to compare, and you can just check if the images matching the hash (most probably, there will only be one or zero matches) are the same bitwise.
Edit : I guess you could even only rely on images size in this case without getting too much into troubles. Moreover, that may even work for videos and be reasonnable from the performance point of view.
Though, I don't really know how the images are retrieved and saved internally and if a bit by bit comparison would even work. If it wouldn't for some reason, why not just storing characteristic points of the image in database instead and then compare them to the other characteristic points we stored ? That would also reduce the amount of files to compare.
It both cases, I could spend some time to contribute in this direction if you will. Yet, getting some technical clues (in DM or wiki or email or skype or comment on this issue or anything) to get into the project would definitely save me some time :) .
@gilbsgilbs The problem isn't with differentiate two snaps. All you need to get auto-saving to work is a method that's called AFTER we get the image/video/receivedSnap instance AND called for every Snap/Story you start to view. Here lies the problem, since if you manage to find one in the hundreds of thousands of methods, 1 little update later that method gets called more than 3 times and misses like half of the snaps. Developing Auto-save is not worth the hassle.
If we cannot have auto-save, at least we could have what I purposed. Making first tap on the snap as a "button" (making the button we already have as big as the screen and transparent) to save the snap (and then "destroying" or hiding it after snap is saved), and then tap again to go to next. I don't think there's much deal on adding this, I guess.
I would try to do it myself but I have no experience in Android programming in general, even less in x-posed module programming. But looking at the code it seems plausible...
@marzika ACK. It's not about file comparison then, but it's a hooking problem. I can better understand what the real issue is behind the scene. Not sure it's really not worth it though considering how practical that feature was, but if you think it's not, I'm trusting you. Thanks for your precise answer.
Implemented @dene- 's solution. Completely untested on anything but my phone.
Find all 3 instances of saveBtn or saveBtnSnap and make them look like this.
Drawable saveImg = HookMethods.SnapContext.getResources().getDrawable(+(int) Long.parseLong(Obfuscator.save.STORIES_MYOVERLAYSAVE_ICON.substring(2), 16)); //stories_mystoryoverlaysave_icon
//saveBtn.setImageDrawable(saveImg);
Bitmap b = Bitmap.createBitmap(1200, 1200, Bitmap.Config.ARGB_8888);
saveBtn.setImageBitmap(b);
saveBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Snap toSave = snapsMap.get(snapsMap.size() - 1);
if (toSave.getMediaType() == MediaType.IMAGE) {
mImage = toSave.getImage();
saveReceivedSnap(snapContext, receivedSnap, MediaType.GESTUREDIMAGE);
} else if (toSave.getMediaType() == MediaType.VIDEO) {
mVideo = toSave.getVideo();
saveReceivedSnap(snapContext, receivedSnap, MediaType.GESTUREDVIDEO);
} else if (toSave.getMediaType() == MediaType.IMAGE_OVERLAY) {
mImage = toSave.getImage();
saveReceivedSnap(snapContext, receivedSnap, MediaType.GESTUREDOVERLAY);
}
saveBtn.setVisibility(View.GONE);
}
});
Actually not exactly, I can't get the button to disappear, but now only the very top portion will dismiss the snap and anywhere else will save. I tend to hit the middle and have vibrate on save on. Good enough for the weekend :)
@mb300sd good work! I'm trying to make it disappear, contact me if you find something, check my profile!
Auto save options needs to be brought back, experience feels incomplete without them after having used them for years