mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:12:44 +00:00 
			
		
		
		
	ChanViewer: Add a status bar to show loading status
Also update the window title with the current board after loading. :^)
This commit is contained in:
		
							parent
							
								
									fdcaf2d2b5
								
							
						
					
					
						commit
						cd08c8e1bf
					
				
					 3 changed files with 30 additions and 2 deletions
				
			
		|  | @ -32,12 +32,18 @@ void ThreadCatalogModel::update() | |||
| 
 | ||||
|     auto* job = request.schedule(); | ||||
| 
 | ||||
|     if (on_load_started) | ||||
|         on_load_started(); | ||||
| 
 | ||||
|     job->on_finish = [job, this](bool success) { | ||||
|         auto* response = job->response(); | ||||
|         dbg() << "Catalog download finished, success=" << success << ", response=" << response; | ||||
| 
 | ||||
|         if (!success) | ||||
|         if (!success) { | ||||
|             if (on_load_finished) | ||||
|                 on_load_finished(false); | ||||
|             return; | ||||
|         } | ||||
| 
 | ||||
|         dbg() << "Catalog payload size: " << response->payload().size(); | ||||
| 
 | ||||
|  | @ -61,6 +67,9 @@ void ThreadCatalogModel::update() | |||
|         } | ||||
| 
 | ||||
|         did_update(); | ||||
| 
 | ||||
|         if (on_load_finished) | ||||
|             on_load_finished(true); | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling