kopia lustrzana https://gitlab.com/mysocialportal/relatica
Fix unreshare causing post to disappear
rodzic
3f23e3e2fd
commit
45f3718c28
|
@ -155,9 +155,6 @@ class TimelineManager extends ChangeNotifier {
|
||||||
FutureResult<EntryTreeItem, ExecError> resharePost(String id) async {
|
FutureResult<EntryTreeItem, ExecError> resharePost(String id) async {
|
||||||
final result = await entryManagerService.resharePost(id);
|
final result = await entryManagerService.resharePost(id);
|
||||||
if (result.isSuccess) {
|
if (result.isSuccess) {
|
||||||
for (final t in cachedTimelines.values) {
|
|
||||||
t.addOrUpdate([result.value]);
|
|
||||||
}
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -166,9 +163,6 @@ class TimelineManager extends ChangeNotifier {
|
||||||
FutureResult<bool, ExecError> unResharePost(String id) async {
|
FutureResult<bool, ExecError> unResharePost(String id) async {
|
||||||
final result = await entryManagerService.unResharePost(id);
|
final result = await entryManagerService.unResharePost(id);
|
||||||
if (result.isSuccess) {
|
if (result.isSuccess) {
|
||||||
for (final t in cachedTimelines.values) {
|
|
||||||
t.removeTimelineEntry(id);
|
|
||||||
}
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Ładowanie…
Reference in New Issue