[Gekidou] retry post (#6293)

* Add try again functionality to failed posts

* Fix attach files on Android

* feedback review

* Prevent android crash when uploading files for the first time

* Update the timestamp for updateAt when retrying to post

* Add POST TIME TO FAIL

* use function isPostFailed
This commit is contained in:
Elias Nahum
2022-05-20 13:23:19 -04:00
committed by GitHub
parent 502efbcdc0
commit e883186fde
10 changed files with 152 additions and 15 deletions

View File

@@ -110,6 +110,23 @@ public class MattermostManagedModule extends ReactContextBaseJavaModule {
return "MattermostManaged";
}
@ReactMethod
public void getFilePath(String filePath, Promise promise) {
Activity currentActivity = getCurrentActivity();
WritableMap map = Arguments.createMap();
if (currentActivity != null) {
Uri uri = Uri.parse(filePath);
String path = RealPathUtil.getRealPathFromURI(currentActivity, uri);
if (path != null) {
String text = "file://" + path;
map.putString("filePath", text);
}
}
promise.resolve(map);
}
@ReactMethod
public void isRunningInSplitView(final Promise promise) {
WritableMap result = Arguments.createMap();