forked from Ivasoft/mattermost-mobile
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user