fix-disable-spotlight-chat-media
This commit is contained in:
@@ -33,8 +33,8 @@ tasks.register<GetVersionTask>("getVersion") {
|
||||
}
|
||||
|
||||
// You can still set these for legacy use by submodules or scripts:
|
||||
rootProject.ext.set("appVersionName", providers.gradleProperty("APP_VERSION_NAME").orElse("1.6.8").get())
|
||||
rootProject.ext.set("appVersionCode", providers.gradleProperty("APP_VERSION_CODE").orElse("324").get().toInt())
|
||||
rootProject.ext.set("appVersionName", providers.gradleProperty("APP_VERSION_NAME").orElse("1.6.9").get())
|
||||
rootProject.ext.set("appVersionCode", providers.gradleProperty("APP_VERSION_CODE").orElse("325").get().toInt())
|
||||
rootProject.ext.set("applicationId", "me.eternal.purrfectsnap")
|
||||
// buildHash: when PurrfectSnap or Snapchat is updated, mappings become outdated and auto-regenerate.
|
||||
// Include version code so each release has a different hash; use random for uniqueness within same version.
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
## v1.6.9
|
||||
- New: Updated the Stealth mode for better visibility with the chat stealth mode (keeps chats from being read), and snap stealth-mode and full stealth mode toggle (normal stealth-mode). (tq Javalsta)
|
||||
- Fix: Fixed performance mode profile save/load so Disabled persists correctly and no longer falls back to Max mode on app restart. (tq schrodingerspet)
|
||||
- Fix: Fixed the resume/reopen UI break when max performance mode is turned on, and other bug fixes. (tq schrodingerspet)
|
||||
- New: Implemented an Auto Open Stop Button directly within the notification card.
|
||||
- New: Added a log filter menu in logs page to isolate Auto-Open, Media downloads, friend tracker, and Core logs.
|
||||
- Fix: Completely rewritten Auto Open Engine to optimize the auto open engine.
|
||||
- Fix: Fixed Batch Story Download feature not working.
|
||||
- FIx: Minor bug fixes for media downloader in stories and spotlight.
|
||||
- Fix: Bug fixes to improve custom emojis stability.
|
||||
|
||||
## v1.6.8
|
||||
- Fix: Many improvements to the Performance Mode feature(Max, turned on by Default), changes are pretty noticeable: faster loading of chats, long group messages optimizations, many snapmap optimizations
|
||||
- Fix: Crash issues for some devices
|
||||
|
||||
@@ -71,20 +71,38 @@ class UITweaks : Feature("UITweaks") {
|
||||
|
||||
private fun shouldHideSpotlightNav(
|
||||
event: AddViewEvent,
|
||||
spotlightNavIds: Set<Int>
|
||||
spotlightNavIds: Set<Int>,
|
||||
spotlightNavNames: Set<String>
|
||||
): Boolean {
|
||||
fun resourceEntryNameOrNull(id: Int): String? {
|
||||
if (id == View.NO_ID || id == 0) return null
|
||||
return runCatching { context.resources.getResourceEntryName(id) }.getOrNull()
|
||||
}
|
||||
|
||||
val viewId = event.view.id
|
||||
if (viewId in spotlightNavIds) return true
|
||||
val parentId = event.parent.id
|
||||
if (viewId in spotlightNavIds || parentId in spotlightNavIds) return true
|
||||
|
||||
val resourceNames = listOfNotNull(
|
||||
resourceEntryNameOrNull(viewId),
|
||||
resourceEntryNameOrNull(parentId)
|
||||
)
|
||||
|
||||
if (resourceNames.any { it in spotlightNavNames }) return true
|
||||
|
||||
// Keep the fallback scoped to home/bottom navigation resource names so
|
||||
// chat media viewers and spotlight-related content surfaces still open.
|
||||
val resourceEntryName = runCatching { context.resources.getResourceEntryName(viewId) }.getOrNull()
|
||||
?: return false
|
||||
return resourceEntryName.contains("spotlight", ignoreCase = true) &&
|
||||
(
|
||||
resourceEntryName.contains("hova_nav", ignoreCase = true) ||
|
||||
resourceEntryName.contains("bottom_nav", ignoreCase = true)
|
||||
)
|
||||
val parentClassName = event.parent.javaClass.name
|
||||
val isHomeNavigationContainer = parentClassName.contains("hova", ignoreCase = true) &&
|
||||
(parentClassName.contains("nav", ignoreCase = true) || parentClassName.contains("tab", ignoreCase = true))
|
||||
|
||||
return isHomeNavigationContainer && resourceNames.any { resourceEntryName ->
|
||||
resourceEntryName.contains("spotlight", ignoreCase = true) &&
|
||||
(
|
||||
resourceEntryName.contains("hova_nav", ignoreCase = true) ||
|
||||
resourceEntryName.contains("bottom_nav", ignoreCase = true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun onActivityCreate() {
|
||||
@@ -105,6 +123,12 @@ class UITweaks : Feature("UITweaks") {
|
||||
getId("hova_nav_spotlight_tab", "id"),
|
||||
getId("hova_nav_spotlight_button", "id")
|
||||
).filter { it != 0 }.toSet()
|
||||
val spotlightNavNames = setOf(
|
||||
"hova_nav_spotlight",
|
||||
"ngs_hova_nav_spotlight",
|
||||
"hova_nav_spotlight_tab",
|
||||
"hova_nav_spotlight_button"
|
||||
)
|
||||
|
||||
Resources::class.java.methods.first { it.name == "getDimensionPixelSize" }.hook(
|
||||
HookStage.AFTER,
|
||||
@@ -150,7 +174,7 @@ class UITweaks : Feature("UITweaks") {
|
||||
hideStorySection(event)
|
||||
}
|
||||
|
||||
if (disableSpotlight && shouldHideSpotlightNav(event, spotlightNavIds)) {
|
||||
if (disableSpotlight && shouldHideSpotlightNav(event, spotlightNavIds, spotlightNavNames)) {
|
||||
view.hideViewCompletely()
|
||||
event.canceled = true
|
||||
return@subscribe
|
||||
|
||||
@@ -7,8 +7,8 @@ org.gradle.configuration-cache=true
|
||||
org.gradle.configuration-cache.problems=warn
|
||||
nativeAbis=arm64-v8a
|
||||
|
||||
APP_VERSION_NAME=1.6.8
|
||||
APP_VERSION_CODE=324
|
||||
APP_VERSION_NAME=1.6.9
|
||||
APP_VERSION_CODE=325
|
||||
debug_build_hash=18fe2a814d0e2eb5
|
||||
psIntegrityPinnedSha256=
|
||||
EXPECTED_CERT_SHA256=0f188cb17d8ea4902ee15ce98f4928ba4226a4790fa3c52f62d776b08e46ca1c
|
||||
|
||||
Reference in New Issue
Block a user