From c37a3a8b8c3f95d29b8903d1b4c6ecb7ce0fa356 Mon Sep 17 00:00:00 2001 From: a1batross Date: Mon, 17 Aug 2020 23:21:50 +0200 Subject: [PATCH] Rename Husky in generated file names to Tusky to prevent harassment towards Husky users --- .../com/keylesspalace/tusky/components/compose/MediaUploader.kt | 2 +- app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt | 2 +- .../main/java/com/keylesspalace/tusky/util/SaveTootHelper.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt b/app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt index 214dd02b..0d3b42f3 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt @@ -47,7 +47,7 @@ sealed class UploadEvent { fun createNewImageFile(context: Context): File { // Create an image file name val randomId = randomAlphanumericString(12) - val imageFileName = "Husky_${randomId}_" + val imageFileName = "Tusky_${randomId}_" val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES) return File.createTempFile( imageFileName, /* prefix */ diff --git a/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt b/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt index a943f5f5..43f05e9c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt +++ b/app/src/main/java/com/keylesspalace/tusky/util/MediaUtils.kt @@ -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 = "Husky_Share_Media" +private const val MEDIA_TEMP_PREFIX = "Tusky_Share_Media" const val MEDIA_SIZE_UNKNOWN = -1L /** diff --git a/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java b/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java index 161364a5..f74200c6 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java +++ b/app/src/main/java/com/keylesspalace/tusky/util/SaveTootHelper.java @@ -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("Husky_Draft_Media_%s.%s", timeStamp, fileExtension); + String filename = String.format("Tusky_Draft_Media_%s.%s", timeStamp, fileExtension); File file = new File(directory, filename); filesSoFar.add(file); boolean copied = IOUtils.copyToFile(contentResolver, uri, file);