-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from rodit/bitmoji-presence
Fix bitmoji presence/typing hiding.
- Loading branch information
Showing
8 changed files
with
100 additions
and
37 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
app/src/main/java/xyz/rodit/snapmod/features/conversations/PreventTypingNotifications.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package xyz.rodit.snapmod.features.conversations; | ||
|
||
import de.robv.android.xposed.XC_MethodHook; | ||
import xyz.rodit.snapmod.features.FeatureContext; | ||
import xyz.rodit.snapmod.mappings.Callback; | ||
import xyz.rodit.snapmod.mappings.ConversationManager; | ||
import xyz.rodit.snapmod.util.UUIDUtil; | ||
|
||
public class PreventTypingNotifications extends StealthFeature { | ||
|
||
public PreventTypingNotifications(FeatureContext context) { | ||
super(context); | ||
} | ||
|
||
@Override | ||
protected void init() { | ||
setClass(ConversationManager.getMapping()); | ||
|
||
putFilters(ConversationManager.sendTypingNotification, | ||
p -> null, | ||
p -> UUIDUtil.fromSnap(p.args[0]), | ||
new NullFilter(context, "hide_typing")); | ||
} | ||
|
||
@Override | ||
protected void onPostHook(XC_MethodHook.MethodHookParam param) { | ||
for (Object o : param.args) { | ||
if (Callback.isInstance(o)) { | ||
Callback.wrap(o).onSuccess(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters