mirror of
				https://github.com/fabianonline/telegram_backup.git
				synced 2025-11-04 01:27:47 +00:00 
			
		
		
		
	Configurable delay between Message downloads.
This commit is contained in:
		@@ -19,6 +19,7 @@ class Config {
 | 
			
		||||
    
 | 
			
		||||
    public static final int FILE_DOWNLOAD_BLOCK_SIZE = 10*1024*1024;
 | 
			
		||||
    
 | 
			
		||||
    public static final int DELAY_AFTER_GET_MESSAGES = 200;
 | 
			
		||||
    public static final int DELAY_AFTER_GET_FILE = 200;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -77,7 +77,7 @@ class DownloadManager {
 | 
			
		||||
			prog.onMessageDownloaded(response.getMessages().size());
 | 
			
		||||
			db.save(response.getMessages());
 | 
			
		||||
			try {
 | 
			
		||||
				Thread.sleep(750);
 | 
			
		||||
				Thread.sleep(Config.DELAY_AFTER_GET_MESSAGES);
 | 
			
		||||
			} catch (InterruptedException e) {}
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user