⬆️ Upgrade to support latest version of server
This commit is contained in:
@ -24,12 +24,12 @@ class AccountAvatar extends StatelessWidget {
|
||||
if (content is String) {
|
||||
direct = content.startsWith('http');
|
||||
if (!isEmpty) isEmpty = content.isEmpty;
|
||||
if (!isEmpty) isEmpty = content.endsWith('/api/attachments/0');
|
||||
if (!isEmpty) isEmpty = content.endsWith('/attachments/0');
|
||||
}
|
||||
|
||||
final url = direct
|
||||
? content
|
||||
: '${ServiceFinder.services['paperclip']}/api/attachments/$content';
|
||||
: ServiceFinder.buildUrl('files', '/attachments/$content');
|
||||
|
||||
return CircleAvatar(
|
||||
key: Key('a$content'),
|
||||
@ -68,12 +68,12 @@ class AccountProfileImage extends StatelessWidget {
|
||||
if (content is String) {
|
||||
direct = content.startsWith('http');
|
||||
if (!isEmpty) isEmpty = content.isEmpty;
|
||||
if (!isEmpty) isEmpty = content.endsWith('/api/attachments/0');
|
||||
if (!isEmpty) isEmpty = content.endsWith('/attachments/0');
|
||||
}
|
||||
|
||||
final url = direct
|
||||
? content
|
||||
: '${ServiceFinder.services['paperclip']}/api/attachments/$content';
|
||||
: ServiceFinder.buildUrl('files', '/attachments/$content');
|
||||
|
||||
if (PlatformInfo.canCacheImage) {
|
||||
return CachedNetworkImage(
|
||||
|
@ -24,9 +24,9 @@ class _AccountProfilePopupState extends State<AccountProfilePopup> {
|
||||
setState(() => _isBusy = true);
|
||||
|
||||
final client = GetConnect();
|
||||
client.httpClient.baseUrl = ServiceFinder.services['passport'];
|
||||
client.httpClient.baseUrl = ServiceFinder.buildUrl('auth', null);
|
||||
|
||||
final resp = await client.get('/api/users/${widget.account.name}');
|
||||
final resp = await client.get('/users/${widget.account.name}');
|
||||
if (resp.statusCode == 200) {
|
||||
_userinfo = Account.fromJson(resp.body);
|
||||
setState(() => _isBusy = false);
|
||||
|
Reference in New Issue
Block a user