app: all external references are now called Husky to not conflict with Tusky files
This commit is contained in:
parent
48b259800a
commit
9fb8dbc732
@ -208,7 +208,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||
}
|
||||
|
||||
// Flush old media that was cached for sharing
|
||||
deleteStaleCachedMedia(applicationContext.getExternalFilesDir("Tusky"))
|
||||
deleteStaleCachedMedia(applicationContext.getExternalFilesDir("Husky"))
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
|
@ -245,7 +245,7 @@ class ViewMediaActivity : BaseActivity(), ViewImageFragment.PhotoActionsListener
|
||||
}
|
||||
|
||||
private fun shareMedia() {
|
||||
val directory = applicationContext.getExternalFilesDir("Tusky")
|
||||
val directory = applicationContext.getExternalFilesDir("Husky")
|
||||
if (directory == null || !(directory.exists())) {
|
||||
Log.e(TAG, "Error obtaining directory to save temporary media.")
|
||||
return
|
||||
|
@ -47,7 +47,7 @@ sealed class UploadEvent {
|
||||
fun createNewImageFile(context: Context): File {
|
||||
// Create an image file name
|
||||
val randomId = randomAlphanumericString(12)
|
||||
val imageFileName = "Tusky_${randomId}_"
|
||||
val imageFileName = "Husky_${randomId}_"
|
||||
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
|
||||
return File.createTempFile(
|
||||
imageFileName, /* prefix */
|
||||
|
@ -36,7 +36,7 @@ import java.util.Locale
|
||||
* Helper methods for obtaining and resizing media files
|
||||
*/
|
||||
private const val TAG = "MediaUtils"
|
||||
private const val MEDIA_TEMP_PREFIX = "Tusky_Share_Media"
|
||||
private const val MEDIA_TEMP_PREFIX = "Husky_Share_Media"
|
||||
const val MEDIA_SIZE_UNKNOWN = -1L
|
||||
|
||||
/**
|
||||
|
@ -129,7 +129,7 @@ public final class SaveTootHelper {
|
||||
private List<String> saveMedia(@NonNull List<String> mediaUris,
|
||||
@Nullable List<String> existingUris) {
|
||||
|
||||
File directory = context.getExternalFilesDir("Tusky");
|
||||
File directory = context.getExternalFilesDir("Husky");
|
||||
|
||||
if (directory == null || !(directory.exists())) {
|
||||
Log.e(TAG, "Error obtaining directory to save media.");
|
||||
@ -158,7 +158,7 @@ public final class SaveTootHelper {
|
||||
String mimeType = contentResolver.getType(uri);
|
||||
MimeTypeMap map = MimeTypeMap.getSingleton();
|
||||
String fileExtension = map.getExtensionFromMimeType(mimeType);
|
||||
String filename = String.format("Tusky_Draft_Media_%s.%s", timeStamp, fileExtension);
|
||||
String filename = String.format("Husky_Draft_Media_%s.%s", timeStamp, fileExtension);
|
||||
File file = new File(directory, filename);
|
||||
filesSoFar.add(file);
|
||||
boolean copied = IOUtils.copyToFile(contentResolver, uri, file);
|
||||
|
Loading…
Reference in New Issue
Block a user