mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 06:22:56 +00:00 
			
		
		
		
	Refactor autosave interval to a const
This commit is contained in:
		@@ -19,6 +19,7 @@ import { ProcessManagerService } from '../services/processmanager.service';
 | 
			
		||||
const modelist = brace.acequire('ace/ext/modelist');
 | 
			
		||||
 | 
			
		||||
const defaultSourceCode = `alert( 'Hello, world!' );`;
 | 
			
		||||
const autosave_interval = 10000;
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
  selector: 'app-webide',
 | 
			
		||||
@@ -48,7 +49,7 @@ export class WebideComponent implements OnInit {
 | 
			
		||||
    this.requestCode();
 | 
			
		||||
    this.processManagerService.init();
 | 
			
		||||
    this.processManagerService.subscribeCallback('login', (event) => { this.setButtonStateSaved(); });
 | 
			
		||||
    setInterval(() => { this.sendCodeIfDirty(); }, 10000);
 | 
			
		||||
    setInterval(() => { this.sendCodeIfDirty(); }, autosave_interval);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  subscribeWS() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user