@@ -77,12 +77,7 @@ type TopicArgs = {
77
77
zulipFeatureLevel : number ,
78
78
dispatch : Dispatch ,
79
79
_ : 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 > ,
86
81
...
87
82
} ;
88
83
@@ -260,8 +255,8 @@ const toggleResolveTopic = async ({ auth, streamId, topic, _, streams, zulipFeat
260
255
const editTopic = {
261
256
title : 'Edit topic ',
262
257
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 ) ;
265
260
} ,
266
261
} ;
267
262
@@ -516,10 +511,14 @@ export const constructTopicActionButtons = (args: {|
516
511
517
512
const buttons = [ ] ;
518
513
const unreadCount = getUnreadCountForTopic ( unread , streamId , topic ) ;
514
+ const isAdmin = roleIsAtLeast ( ownUserRole , Role . Admin ) ;
519
515
if ( unreadCount > 0 ) {
520
516
buttons . push ( markTopicAsRead ) ;
521
517
}
522
- buttons . push ( editTopic ) ;
518
+ // Set back to isAdmin after testing feature
519
+ if ( true ) {
520
+ buttons . push ( editTopic ) ;
521
+ }
523
522
if ( isTopicMuted ( streamId , topic , mute ) ) {
524
523
buttons . push ( unmuteTopic ) ;
525
524
} else {
@@ -530,7 +529,7 @@ export const constructTopicActionButtons = (args: {|
530
529
} else {
531
530
buttons . push ( unresolveTopic ) ;
532
531
}
533
- if ( roleIsAtLeast ( ownUserRole , Role . Admin ) ) {
532
+ if ( isAdmin ) {
534
533
buttons . push ( deleteTopic ) ;
535
534
}
536
535
const sub = subscriptions . get ( streamId ) ;
@@ -681,12 +680,7 @@ export const showTopicActionSheet = (args: {|
681
680
showActionSheetWithOptions : ShowActionSheetWithOptions ,
682
681
callbacks : { |
683
682
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 > ,
690
684
_ : GetText ,
691
685
| } ,
692
686
backgroundData : $ReadOnly < {
0 commit comments