From fcdcef4ebb87bc5092d20e64b79878230e72b938 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 3 Apr 2021 12:50:46 -0400 Subject: [PATCH] removed "@" for consistency --- .../main/java/awais/instagrabber/utils/DownloadUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/DownloadUtils.java b/app/src/main/java/awais/instagrabber/utils/DownloadUtils.java index ea0d73ac..18bf59c7 100644 --- a/app/src/main/java/awais/instagrabber/utils/DownloadUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/DownloadUtils.java @@ -142,7 +142,7 @@ public final class DownloadUtils { final String sliderPostfix, final String displayUrl, final String username) { - final String usernamePrepend = TextUtils.isEmpty(username) ? "" : "@" + username + "_"; + final String usernamePrepend = TextUtils.isEmpty(username) ? "" : (username + "_"); final String fileName = usernamePrepend + postId + sliderPostfix + getFileExtensionFromUrl(displayUrl); return new File(finalDir, fileName); } @@ -278,7 +278,7 @@ public final class DownloadUtils { final String baseFileName = storyModel.getStoryMediaId() + "_" + storyModel.getTimestamp() + DownloadUtils.getFileExtensionFromUrl(url); final String usernamePrepend = Utils.settingsHelper.getBoolean(Constants.DOWNLOAD_PREPEND_USER_NAME) - && storyModel.getUsername() != null ? "@" + storyModel.getUsername() + "_" : ""; + && storyModel.getUsername() != null ? storyModel.getUsername() + "_" : ""; final File saveFile = new File(downloadDir, usernamePrepend + baseFileName); download(context, url, saveFile.getAbsolutePath()); @@ -306,7 +306,7 @@ public final class DownloadUtils { final Map map = new HashMap<>(); for (final Media media : feedModels) { final User mediaUser = media.getUser(); - final File downloadDir = getDownloadDir(context, mediaUser == null ? "" : "@" + mediaUser.getUsername()); + final File downloadDir = getDownloadDir(context, mediaUser == null ? "" : mediaUser.getUsername()); if (downloadDir == null) return; switch (media.getMediaType()) { case MEDIA_TYPE_IMAGE: