crypto: Update for the new room key import result
This commit is contained in:
		
							parent
							
								
									7cb143e970
								
							
						
					
					
						commit
						e5af7e6109
					
				@ -500,7 +500,8 @@ internal class OlmMachine(
 | 
			
		||||
 | 
			
		||||
                val result = inner.importKeys(decodedKeys, passphrase, rustListener)
 | 
			
		||||
 | 
			
		||||
                ImportRoomKeysResult(result.total, result.imported)
 | 
			
		||||
                // TODO do we want to remove the cast here?
 | 
			
		||||
                ImportRoomKeysResult(result.total.toInt(), result.imported.toInt())
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
    @Throws(CryptoStoreException::class)
 | 
			
		||||
@ -516,7 +517,7 @@ internal class OlmMachine(
 | 
			
		||||
 | 
			
		||||
                val result = inner.importDecryptedKeys(encodedKeys, rustListener)
 | 
			
		||||
 | 
			
		||||
                ImportRoomKeysResult(result.total, result.imported)
 | 
			
		||||
                ImportRoomKeysResult(result.total.toInt(), result.imported.toInt())
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
    @Throws(CryptoStoreException::class)
 | 
			
		||||
 | 
			
		||||
@ -618,8 +618,8 @@ impl OlmMachine {
 | 
			
		||||
            .block_on(self.inner.import_keys(keys, listener))?;
 | 
			
		||||
 | 
			
		||||
        Ok(KeysImportResult {
 | 
			
		||||
            total: result.1 as i32,
 | 
			
		||||
            imported: result.0 as i32,
 | 
			
		||||
            total: result.total_count as i64,
 | 
			
		||||
            imported: result.imported_count as i64,
 | 
			
		||||
        })
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -58,8 +58,8 @@ dictionary DeviceLists {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
dictionary KeysImportResult {
 | 
			
		||||
    i32 total;
 | 
			
		||||
    i32 imported;
 | 
			
		||||
    i64 total;
 | 
			
		||||
    i64 imported;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
dictionary DecryptedEvent {
 | 
			
		||||
 | 
			
		||||
@ -295,8 +295,8 @@ impl From<DeviceLists> for RumaDeviceLists {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub struct KeysImportResult {
 | 
			
		||||
    pub total: i32,
 | 
			
		||||
    pub imported: i32,
 | 
			
		||||
    pub total: i64,
 | 
			
		||||
    pub imported: i64,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub(crate) enum OwnedResponse {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user