Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
android.useAndroidX=true

GROUP_ID=com.linkedin.shaky
VERSION_NAME=3.0.15-SNAPSHOT
VERSION_NAME=4.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ protected Result doInBackground(Bitmap... params) {

File screenshotDirectory = new File(screenshotDirectoryRoot);

if(delegate.enableDeletingOldScreenshots()) {
// delete any old screenshots that we may have left lying around
if (screenshotDirectory.exists()) {
File[] oldScreenshots = screenshotDirectory.listFiles();
for (File oldScreenshot : oldScreenshots) {
if (!oldScreenshot.delete()) {
Log.e(TAG, "Could not delete old screenshot:" + oldScreenshot);
}
// delete any old screenshots that we may have left lying around
if (screenshotDirectory.exists()) {
File[] oldScreenshots = screenshotDirectory.listFiles();
for (File oldScreenshot : oldScreenshots) {
if (!oldScreenshot.delete()) {
Log.e(TAG, "Could not delete old screenshot:" + oldScreenshot);
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions shaky/src/main/java/com/linkedin/android/shaky/ShakeDelegate.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,4 @@ public boolean shouldUseBottomSheet() {
* This method can be overridden to send data to a custom URL endpoint, etc.
*/
public abstract void submit(@NonNull Activity activity, @NonNull Result result);

/**
* @return whether the captured screenshots in memory should be deleted or not before capturing
* a new one.
* Please note that, when disabled, it is the responsibility of the integrating app to delete
* the old screenshots as and when required.
*/
public boolean enableDeletingOldScreenshots() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are deleting a public api, lets bump to next major version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've made changes per your suggestion.
PTAL!

return true;
}
}