@@ -77,12 +77,7 @@ type TopicArgs = {
7777 zulipFeatureLevel : number ,
7878 dispatch : Dispatch ,
7979 _ : GetText ,
80- startEditTopic : (
81- streamId : number ,
82- topic : string ,
83- streamsById : Map < number , Stream> ,
84- _ : GetText ,
85- ) => Promise< void > ,
80+ startEditTopic : ( streamId : number , topic : string ) => Promise < void > ,
8681 ...
8782} ;
8883
@@ -260,8 +255,8 @@ const toggleResolveTopic = async ({ auth, streamId, topic, _, streams, zulipFeat
260255const editTopic = {
261256 title : 'Edit topic ',
262257 errorMessage : 'Failed to resolve topic' ,
263- action : ( { streamId, topic, streams , _ , startEditTopic } ) => {
264- startEditTopic ( streamId , topic , streams , _ ) ;
258+ action : ( { streamId, topic, startEditTopic } ) => {
259+ startEditTopic ( streamId , topic ) ;
265260 } ,
266261} ;
267262
@@ -516,10 +511,14 @@ export const constructTopicActionButtons = (args: {|
516511
517512 const buttons = [ ] ;
518513 const unreadCount = getUnreadCountForTopic ( unread , streamId , topic ) ;
514+ const isAdmin = roleIsAtLeast ( ownUserRole , Role . Admin ) ;
519515 if ( unreadCount > 0 ) {
520516 buttons . push ( markTopicAsRead ) ;
521517 }
522- buttons . push ( editTopic ) ;
518+ // Set back to isAdmin after testing feature
519+ if ( true ) {
520+ buttons . push ( editTopic ) ;
521+ }
523522 if ( isTopicMuted ( streamId , topic , mute ) ) {
524523 buttons . push ( unmuteTopic ) ;
525524 } else {
@@ -530,7 +529,7 @@ export const constructTopicActionButtons = (args: {|
530529 } else {
531530 buttons . push ( unresolveTopic ) ;
532531 }
533- if ( roleIsAtLeast ( ownUserRole , Role . Admin ) ) {
532+ if ( isAdmin ) {
534533 buttons . push ( deleteTopic ) ;
535534 }
536535 const sub = subscriptions . get ( streamId ) ;
@@ -681,12 +680,7 @@ export const showTopicActionSheet = (args: {|
681680 showActionSheetWithOptions : ShowActionSheetWithOptions ,
682681 callbacks : { |
683682 dispatch : Dispatch ,
684- startEditTopic : (
685- streamId : number ,
686- topic : string ,
687- streamsById : Map < number , Stream> ,
688- _ : GetText ,
689- ) => Promise< void > ,
683+ startEditTopic : ( streamId : number , topic : string ) => Promise < void > ,
690684 _ : GetText ,
691685 | } ,
692686 backgroundData : $ReadOnly < {
0 commit comments