kopia lustrzana https://gitlab.com/mysocialportal/relatica
Add self timeline to timeline screen
rodzic
3f40db8408
commit
40380e4a15
|
@ -472,7 +472,8 @@ class FriendicaClient {
|
|||
case TimelineType.profile:
|
||||
return '/accounts/${type.auxData}/statuses';
|
||||
case TimelineType.self:
|
||||
throw UnimplementedError('These types are not supported yet');
|
||||
final myId = getIt<AuthService>().currentId;
|
||||
return '/accounts/$myId/statuses';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -482,11 +483,10 @@ class FriendicaClient {
|
|||
case TimelineType.global:
|
||||
case TimelineType.profile:
|
||||
case TimelineType.group:
|
||||
case TimelineType.self:
|
||||
return '';
|
||||
case TimelineType.local:
|
||||
return 'local=true';
|
||||
case TimelineType.self:
|
||||
throw UnimplementedError('These types are not supported yet');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ enum TimelineType {
|
|||
case TimelineType.profile:
|
||||
return 'Profile';
|
||||
case TimelineType.self:
|
||||
return 'Self';
|
||||
return 'Yours';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +37,7 @@ class TimelineIdentifiers {
|
|||
factory TimelineIdentifiers.home() =>
|
||||
TimelineIdentifiers(timeline: TimelineType.home);
|
||||
|
||||
factory TimelineIdentifiers.profile(String profileId) =>
|
||||
TimelineIdentifiers(
|
||||
factory TimelineIdentifiers.profile(String profileId) => TimelineIdentifiers(
|
||||
timeline: TimelineType.profile,
|
||||
auxData: profileId,
|
||||
);
|
||||
|
@ -53,10 +52,10 @@ class TimelineIdentifiers {
|
|||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is TimelineIdentifiers &&
|
||||
runtimeType == other.runtimeType &&
|
||||
timeline == other.timeline &&
|
||||
auxData == other.auxData;
|
||||
other is TimelineIdentifiers &&
|
||||
runtimeType == other.runtimeType &&
|
||||
timeline == other.timeline &&
|
||||
auxData == other.auxData;
|
||||
|
||||
@override
|
||||
int get hashCode => timeline.hashCode ^ auxData.hashCode;
|
||||
|
|
|
@ -24,6 +24,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
var currentType = TimelineType.home;
|
||||
GroupData? currentGroup;
|
||||
final types = [
|
||||
TimelineType.self,
|
||||
TimelineType.home,
|
||||
TimelineType.global,
|
||||
TimelineType.local,
|
||||
|
|
Ładowanie…
Reference in New Issue