File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -792,7 +792,16 @@ export default {
792792      const  promise  =  thread .sticky  ?  threadsApi .unsticky (thread .id ) :  threadsApi .sticky (thread .id ) 
793793      promise .then (() =>  thread .sticky  =  ! thread .sticky ) 
794794    } 
795-     const  updateThreadTitle  =  () =>  console .log (' updateThreadTitle'  
795+     const  updateThreadTitle  =  () =>  { 
796+       var  title =  ctrl .thread .title ; 
797+       return  Threads .title ({id:  ctrl .thread .id }, {title:  title}).$promise  
798+       .then (function () { ctrl .editThread  =  false ; }) 
799+       .then (function () { 
800+         Alert .success (' Thread\' s title changed to: ' +  title); 
801+         BreadcrumbSvc .updateLabelInPlace (title); 
802+       }) 
803+       .catch (function () { Alert .error (' Error changing thread title'  
804+     } 
796805    const  closeEditThread  =  () =>  console .log (' closeEditThread'  
797806    const  createPoll  =  () =>  console .log (' createPoll'  
798807    const  showEditDate  =  (post ) =>  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments