1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-22 21:16:57 +00:00

removed "@" for consistency

This commit is contained in:
Austin Huang 2021-04-03 12:50:46 -04:00
parent f55e519895
commit fcdcef4ebb
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -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<String, String> 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: