mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-02-28 23:10:29 +00:00
getFSInfo changed to use JS serializable WritableMap instead of HashMap
This commit is contained in:
parent
33d637e42e
commit
01d43a011a
@ -315,9 +315,9 @@ public class RNFSManager extends ReactContextBaseJavaModule {
|
||||
totalSpace = blockSize * stat.getBlockCount();
|
||||
freeSpace = blockSize * stat.getAvailableBlocks();
|
||||
}
|
||||
HashMap info = new HashMap();
|
||||
info.put("totalSpace", totalSpace);
|
||||
info.put("freeSpace", freeSpace);
|
||||
WritableMap info = Arguments.createMap();
|
||||
info.putDouble("totalSpace", (double)totalSpace); // Int32 too small, must use Double
|
||||
info.putDouble("freeSpace", (double)freeSpace);
|
||||
callback.invoke(null, info);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user