-
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.
- Loading branch information
Showing
25 changed files
with
190 additions
and
695 deletions.
There are no files selected for viewing
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
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
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
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
42 changes: 0 additions & 42 deletions
42
app/src/main/java/xyz/rodit/snapmod/features/friendsfeed/FeedModifier.kt
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
app/src/main/java/xyz/rodit/snapmod/features/friendsfeed/FeedSorter.kt
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
app/src/main/java/xyz/rodit/snapmod/features/friendsfeed/PinChats.kt
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,23 @@ | ||
package xyz.rodit.snapmod.features.friendsfeed | ||
|
||
import xyz.rodit.snapmod.features.Feature | ||
import xyz.rodit.snapmod.features.FeatureContext | ||
import xyz.rodit.snapmod.mappings.FriendsFeedConfig | ||
import xyz.rodit.snapmod.mappings.FriendsFeedView | ||
import xyz.rodit.snapmod.util.after | ||
|
||
class PinChats(context: FeatureContext) : Feature(context) { | ||
|
||
override fun performHooks() { | ||
FriendsFeedConfig.constructors.after(context, "allow_pin_chats") { | ||
FriendsFeedConfig.wrap(it.thisObject).isPinConversationsEnabled = true | ||
} | ||
|
||
FriendsFeedView.constructors.after(context, "allow_pin_chats") { | ||
val view = FriendsFeedView.wrap(it.thisObject) | ||
if (context.pinned.isEnabled(view.key)) { | ||
view.pinnedTimestamp = view.lastInteractionTimestamp | ||
} | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
app/src/main/java/xyz/rodit/snapmod/features/friendsfeed/PinSorter.kt
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.