diff --git a/README.md b/README.md index 5d0fe558..30bc11e8 100644 --- a/README.md +++ b/README.md @@ -99,3 +99,4 @@ When redistributing the software, it must remain under the same [GPLv3](https:// - [RevealedSoulEven](https://github.com/revealedsouleven) - [iBasim](https://github.com/ibasim) - [xerta555](https://github.com/xerta555) +- [TheVisual](https://github.com/TheVisual) diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt index df5308cc..17dcd392 100644 --- a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt +++ b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/downloader/MediaDownloader.kt @@ -127,7 +127,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam val downloadOptions = context.config.options(ConfigProperty.DOWNLOAD_OPTIONS) val sanitizedPathPrefix = pathPrefix .replace(" ", "_") - .replace(Regex("[\\\\:*?\"<>|]"), "") + .replace(Regex("[\\p{Cntrl}]"), "") .ifEmpty { hexHash } val currentDateTime = SimpleDateFormat("yyyy-MM-dd_HH-mm-ss", Locale.ENGLISH).format(System.currentTimeMillis()) @@ -304,7 +304,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam if ((snapSource == "PUBLIC_USER" || snapSource == "SAVED_STORY") && (forceDownload || canAutoDownload("public_stories"))) { val userDisplayName = (if (paramMap.containsKey("USER_DISPLAY_NAME")) paramMap["USER_DISPLAY_NAME"].toString() else "").replace( - "[^\\x00-\\x7F]".toRegex(), + "[\\p{Cntrl}]".toRegex(), "") downloadOperaMedia(provideClientDownloadManager( @@ -336,7 +336,7 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam } val storyName = paramMap["STORY_NAME"].toString().replace( - "[^\\x00-\\x7F]".toRegex(), + "[\\p{Cntrl}]".toRegex(), "") //get the position of the media in the playlist and the duration @@ -548,4 +548,4 @@ class MediaDownloader : Feature("MediaDownloader", loadParams = FeatureLoadParam if (messaging.openedConversationUUID == null) return downloadMessageId(messaging.lastFocusedMessageId, isPreviewMode) } -} \ No newline at end of file +} diff --git a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/GalleryMediaSendOverride.kt b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/GalleryMediaSendOverride.kt index 344162fc..7339cce6 100644 --- a/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/GalleryMediaSendOverride.kt +++ b/app/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/GalleryMediaSendOverride.kt @@ -1,6 +1,5 @@ package me.rhunk.snapenhance.features.impl.tweaks -import android.app.AlertDialog import me.rhunk.snapenhance.config.ConfigProperty import me.rhunk.snapenhance.data.ContentType import me.rhunk.snapenhance.data.MessageSender @@ -28,7 +27,7 @@ class GalleryMediaSendOverride : Feature("Gallery Media Send Override", loadPara }) { param -> val localMessageContent = MessageContent(param.arg(1)) if (localMessageContent.contentType != ContentType.EXTERNAL_MEDIA) return@hook - + //prevent story replies val messageProtoReader = ProtoReader(localMessageContent.content) if (messageProtoReader.exists(7)) return@hook @@ -73,4 +72,4 @@ class GalleryMediaSendOverride : Feature("Gallery Media Send Override", loadPara } } } -} \ No newline at end of file +} diff --git a/app/src/main/res/layout/precise_location_dialog.xml b/app/src/main/res/layout/precise_location_dialog.xml index c9607a8d..a9eae946 100644 --- a/app/src/main/res/layout/precise_location_dialog.xml +++ b/app/src/main/res/layout/precise_location_dialog.xml @@ -11,18 +11,18 @@ android:id="@+id/dialog_latitude" android:layout_width="match_parent" android:layout_height="wrap_content" + android:autofillHints="" android:ems="10" - android:inputType="numberDecimal" android:hint="Latitude" - android:autofillHints="" /> + android:inputType="number|numberDecimal|numberSigned" /> + android:inputType="number|numberDecimal|numberSigned" /> \ No newline at end of file