Rename Husky in generated file names to Tusky to prevent harassment towards Husky users
This commit is contained in:
parent
8ce99fcd53
commit
c37a3a8b8c
@ -47,7 +47,7 @@ sealed class UploadEvent {
|
|||||||
fun createNewImageFile(context: Context): File {
|
fun createNewImageFile(context: Context): File {
|
||||||
// Create an image file name
|
// Create an image file name
|
||||||
val randomId = randomAlphanumericString(12)
|
val randomId = randomAlphanumericString(12)
|
||||||
val imageFileName = "Husky_${randomId}_"
|
val imageFileName = "Tusky_${randomId}_"
|
||||||
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
|
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
|
||||||
return File.createTempFile(
|
return File.createTempFile(
|
||||||
imageFileName, /* prefix */
|
imageFileName, /* prefix */
|
||||||
|
@ -36,7 +36,7 @@ import java.util.Locale
|
|||||||
* Helper methods for obtaining and resizing media files
|
* Helper methods for obtaining and resizing media files
|
||||||
*/
|
*/
|
||||||
private const val TAG = "MediaUtils"
|
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
|
const val MEDIA_SIZE_UNKNOWN = -1L
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,7 +158,7 @@ public final class SaveTootHelper {
|
|||||||
String mimeType = contentResolver.getType(uri);
|
String mimeType = contentResolver.getType(uri);
|
||||||
MimeTypeMap map = MimeTypeMap.getSingleton();
|
MimeTypeMap map = MimeTypeMap.getSingleton();
|
||||||
String fileExtension = map.getExtensionFromMimeType(mimeType);
|
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);
|
File file = new File(directory, filename);
|
||||||
filesSoFar.add(file);
|
filesSoFar.add(file);
|
||||||
boolean copied = IOUtils.copyToFile(contentResolver, uri, file);
|
boolean copied = IOUtils.copyToFile(contentResolver, uri, file);
|
||||||
|
Loading…
Reference in New Issue
Block a user