This commit is contained in:
amsyarasyiq 2023-03-16 04:10:24 +00:00
parent e0e98c3798
commit e281aaa21a
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
(function(s,v,f,n,e,b,u,x){"use strict";function F(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}function R(a,r,t){return r in a?Object.defineProperty(a,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[r]=t,a}const g=f.findByStoreName("UserStore"),{ScrollView:S,TouchableOpacity:d,Image:m,FlatList:I}=e.ReactNative,{FormInput:P,FormDivider:h,FormText:N,FormIcon:o,FormRow:p,FormSection:T}=x.Forms,y=e.stylesheet.createThemedStyleSheet({avatar:{height:36,width:36,borderRadius:18},button:{marginRight:12}});function _(a){let{callback:r}=a;return e.React.createElement(d,{onPress:r},e.React.createElement(N,{style:y.button},"ADD"))}function w(a){let{onFinish:r}=a;const[t,i]=e.React.useState(""),c=function(){t&&+t&&g.getUser(t)&&!n.storage.exempted.includes(t)&&(n.storage.exempted=[...n.storage.exempted,t],i("")),r()};return e.React.createElement(e.React.Fragment,null,e.React.createElement(h,null),e.React.createElement(p,{leading:e.React.createElement(o,{source:u.getAssetIDByName("ic_add_friend")}),label:e.React.createElement(P,{autoFocus:!0,title:"User ID",placeholder:"123456789012345678",value:t,keyboardType:"numeric",onChangeText:function(l){return i(l.replace(/[^0-9]/g,"").trim())},returnKeyType:"done"}),trailing:e.React.createElement(d,{onPress:c},e.React.createElement(o,{source:u.getAssetIDByName("ic_add_24px")}))}))}function U(){const[a,r]=e.React.useState(!1),t=b.useProxy(n.storage),i=e.NavigationNative.useNavigation();return e.React.useEffect(function(){i.setOptions({headerRight:function(){return e.React.createElement(_,{callback:function(){return r(!0)}})}})},[]),e.React.createElement(S,null,e.React.createElement(T,{title:"Exempted Users",titleStyleType:"no_border"},t.exempted?.length>0&&e.React.createElement(I,{data:t.exempted,keyExtractor:function(c){return c},renderItem:function(c){let{item:l}=c;const E=g.getUser(l);return e.React.createElement(p,{label:E.username,leading:e.React.createElement(m,{style:y.avatar,source:{uri:E.getAvatarURL()}}),trailing:e.React.createElement(d,{onPress:function(){n.storage.exempted=n.storage.exempted.filter(function(C){return C!==l})}},e.React.createElement(o,{source:u.getAssetIDByName("Small"),disableColor:!0}))})},ItemSeparatorComponent:h}),a&&e.React.createElement(w,{onFinish:function(){return r(!1)}})))}const D=f.findByProps("createPendingReply");n.storage.exempted??=[];var A=new function a(){F(this,a),R(this,"settings",U),R(this,"onUnload",v.patcher.before("createPendingReply",D,function(r){let[t]=r;t.shouldMention&&=n.storage.exempted.includes(t.message?.author?.id)}))};return s.default=A,Object.defineProperty(s,"__esModule",{value:!0}),s})({},vendetta,vendetta.metro,vendetta.plugin,vendetta.metro.common,vendetta.storage,vendetta.ui.assets,vendetta.ui.components);
(function(c,y,f,b,e,v,s,x){"use strict";function F(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function g(a,n,r){return n in a?Object.defineProperty(a,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[n]=r,a}const R=f.findByStoreName("UserStore"),{ScrollView:w,TouchableOpacity:o,Image:I,FlatList:m}=e.ReactNative,{FormInput:N,FormDivider:p,FormText:S,FormIcon:u,FormRow:h,FormSection:k,FormSwitchRow:B}=x.Forms,E=e.stylesheet.createThemedStyleSheet({avatar:{height:36,width:36,borderRadius:18},button:{marginRight:12}});function P(a){let{callback:n}=a;return e.React.createElement(o,{onPress:n},e.React.createElement(S,{style:E.button},"ADD"))}function U(a){let{onFinish:n}=a;const[r,i]=e.React.useState(""),d=function(){!isNaN(parseInt(r))&&R.getUser(r)&&!t.exempted.includes(r)&&(t.exempted=[...t.exempted,r],i("")),n()};return e.React.createElement(h,{leading:e.React.createElement(u,{source:s.getAssetIDByName("ic_add_friend")}),label:e.React.createElement(N,{autoFocus:!0,title:"User ID",placeholder:"123456789012345678",value:r,keyboardType:"numeric",onChangeText:function(l){return i(l.replace(/[^0-9]/g,"").trim())},returnKeyType:"done"}),trailing:e.React.createElement(o,{onPress:d},e.React.createElement(u,{source:s.getAssetIDByName("ic_add_24px")}))})}function _(){v.useProxy(t);const[a,n]=e.React.useState(!1),r=e.NavigationNative.useNavigation();return e.React.useEffect(function(){r.setOptions({headerRight:function(){return e.React.createElement(P,{callback:function(){return n(!0)}})}})},[]),e.React.createElement(w,null,e.React.createElement(B,{label:"Enable blacklist mode",subLabel:"If enabled, only users in the exempted list will be affected by the plugin.",leading:e.React.createElement(u,{source:s.getAssetIDByName("ic_block")}),value:t.isBlacklistMode,onValueChange:function(i){return t.isBlacklistMode=i}}),e.React.createElement(k,{title:"Exempted Users"},t.exempted?.length>0&&e.React.createElement(m,{data:t.exempted,keyExtractor:function(i){return i},renderItem:function(i){let{item:d}=i;const l=R.getUser(d);if(!l)throw new Error("User not found/is not cached");return e.React.createElement(h,{label:l.username,leading:e.React.createElement(I,{style:E.avatar,source:{uri:l.getAvatarURL()}}),trailing:e.React.createElement(o,{onPress:function(){t.exempted=t.exempted.filter(function(A){return A!==d})}},e.React.createElement(u,{source:s.getAssetIDByName("Small"),disableColor:!0}))})},ItemSeparatorComponent:p}),a&&e.React.createElement(e.React.Fragment,null,e.React.createElement(p,null),e.React.createElement(U,{onFinish:function(){return n(!1)}}))))}const t=b.storage,D=f.findByProps("createPendingReply");t.isBlacklistMode??=!1,t.exempted??=[];var T=new function a(){F(this,a),g(this,"settings",_),g(this,"onUnload",y.patcher.before("createPendingReply",D,function(n){let[r]=n;const i=t.exempted.includes(r.message?.author?.id);r.shouldMention&&=t.isBlacklistMode?!i:i}))};return c.default=T,c.settings=t,Object.defineProperty(c,"__esModule",{value:!0}),c})({},vendetta,vendetta.metro,vendetta.plugin,vendetta.metro.common,vendetta.storage,vendetta.ui.assets,vendetta.ui.components);

View file

@ -1 +1 @@
{"name":"NoAutoReplyMention","description":"Turns off auto mention when replying to someone.","authors":[{"name":"amsyarasyiq","id":"492949202121261067"}],"main":"index.js","vendetta":{"icon":"ic_notif_off"},"hash":"3d7e4738159925fa69e65006881aaef5c775260316b58044b68608ae817050d5"}
{"name":"NoAutoReplyMention","description":"Turns off auto mention when replying to someone.","authors":[{"name":"amsyarasyiq","id":"492949202121261067"}],"main":"index.js","vendetta":{"icon":"ic_notif_off"},"hash":"6d59ee54329291e2551dff69cb23ecf7cd00a029809b1d90cef62298f24176cf"}