Do not show cache size in wikivoyage options menu
This commit is contained in:
parent
9be00bec1f
commit
128d8a749f
1 changed files with 1 additions and 13 deletions
|
@ -12,7 +12,6 @@ import android.view.MenuItem;
|
|||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
|
||||
import net.osmand.AndroidUtils;
|
||||
import net.osmand.PicassoUtils;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandSettings;
|
||||
|
@ -28,7 +27,6 @@ import net.osmand.plus.wikivoyage.data.TravelDbHelper;
|
|||
import net.osmand.plus.wikivoyage.data.TravelLocalDataHelper;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class WikivoyageOptionsBottomSheetDialogFragment extends MenuBottomSheetDialogFragment {
|
||||
|
@ -95,7 +93,7 @@ public class WikivoyageOptionsBottomSheetDialogFragment extends MenuBottomSheetD
|
|||
BaseBottomSheetItem clearCacheItem = new BottomSheetItemWithDescription.Builder()
|
||||
.setDescription(getString(R.string.shared_string_clear))
|
||||
.setDescriptionColorId(nightMode ? R.color.wikivoyage_active_dark : R.color.wikivoyage_active_light)
|
||||
.setTitle(getString(R.string.images_cache) + getCacheSize())
|
||||
.setTitle(getString(R.string.images_cache))
|
||||
.setLayoutId(R.layout.bottom_sheet_item_with_right_descr)
|
||||
.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
@ -158,14 +156,4 @@ public class WikivoyageOptionsBottomSheetDialogFragment extends MenuBottomSheetD
|
|||
.setNegativeButton(R.string.shared_string_dismiss, null)
|
||||
.show();
|
||||
}
|
||||
|
||||
private String getCacheSize() {
|
||||
long cacheBytes = 0;
|
||||
try {
|
||||
cacheBytes += PicassoUtils.getDiskCacheSizeBytes();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return ": " + AndroidUtils.formatSize(cacheBytes);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue