fix(betterActivities): only patch BiteSizePopout type

We don't want to patch the user modal activity tab for example
This commit is contained in:
Nico 2024-07-11 22:16:37 +02:00 committed by GitHub
parent 5824528add
commit a2e089716a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -256,8 +256,8 @@ export default definePlugin({
// Show all activities in the user popout/sidebar
find: '"UserActivityContainer"',
replacement: {
match: /(?<=\(0,\i\.jsx\)\()\i\.\i(?=,{type:\i.\i.BITE_SIZE_POPOUT,activity:\i,className:\i\.activity,source:\i,user:\i)/,
replace: "$self.showAllActivitiesComponent"
match: /(?<=\(0,\i\.jsx\)\()(\i\.\i)(?=,{...(\i),activity:\i,user:\i,application:\i)/,
replace: "$2.type==='BiteSizePopout'?$self.showAllActivitiesComponent:$1"
},
predicate: () => settings.store.profiles
},