Return gracefully if posts are not found
This fixes the spinner going on forever when non-existent tags are added.
This commit is contained in:
		
					parent
					
						
							
								ef46a379a0
							
						
					
				
			
			
				commit
				
					
						4550f54f32
					
				
			
		
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -428,6 +428,12 @@ void DanbooruService::processPostList(KJob *job)
 | 
			
		|||
 | 
			
		||||
    // How many posts do we have to fetch?
 | 
			
		||||
 | 
			
		||||
    if (postList.isEmpty()) {
 | 
			
		||||
        qCDebug(LIBDANBOORU) << "No posts found";
 | 
			
		||||
        Q_EMIT(postDownloadFinished());
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    m_postsToFetch = postList.length();
 | 
			
		||||
 | 
			
		||||
    for (auto element : postList) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue