mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-06 18:24:42 +08:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
0b5329d050 |
@ -126,7 +126,7 @@ class MorePopupMenu extends StatelessWidget {
|
|||||||
color: Palette.orange,
|
color: Palette.orange,
|
||||||
),
|
),
|
||||||
onOpen: (LinkableElement link) =>
|
onOpen: (LinkableElement link) =>
|
||||||
LinkUtil.launch,
|
LinkUtil.launch(link.url),
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
TextButton(
|
TextButton(
|
||||||
|
@ -62,29 +62,29 @@ class _PollViewState extends State<PollView> {
|
|||||||
listener: (BuildContext context, VoteState voteState) {
|
listener: (BuildContext context, VoteState voteState) {
|
||||||
ScaffoldMessenger.of(context).clearSnackBars();
|
ScaffoldMessenger.of(context).clearSnackBars();
|
||||||
if (voteState.status == VoteStatus.submitted) {
|
if (voteState.status == VoteStatus.submitted) {
|
||||||
context.showSnackBar(
|
showSnackBar(
|
||||||
content: 'Vote submitted successfully.',
|
content: 'Vote submitted successfully.',
|
||||||
);
|
);
|
||||||
} else if (voteState.status == VoteStatus.canceled) {
|
} else if (voteState.status == VoteStatus.canceled) {
|
||||||
context.showSnackBar(content: 'Vote canceled.');
|
showSnackBar(content: 'Vote canceled.');
|
||||||
} else if (voteState.status == VoteStatus.failure) {
|
} else if (voteState.status == VoteStatus.failure) {
|
||||||
context.showErrorSnackBar();
|
showErrorSnackBar();
|
||||||
} else if (voteState.status ==
|
} else if (voteState.status ==
|
||||||
VoteStatus.failureKarmaBelowThreshold) {
|
VoteStatus.failureKarmaBelowThreshold) {
|
||||||
context.showSnackBar(
|
showSnackBar(
|
||||||
content: "You can't downvote because"
|
content: "You can't downvote because"
|
||||||
' you are karmaly broke.',
|
' you are karmaly broke.',
|
||||||
);
|
);
|
||||||
} else if (voteState.status ==
|
} else if (voteState.status ==
|
||||||
VoteStatus.failureNotLoggedIn) {
|
VoteStatus.failureNotLoggedIn) {
|
||||||
context.showSnackBar(
|
showSnackBar(
|
||||||
content: 'Not logged in, no voting! (;`O´)o',
|
content: 'Not logged in, no voting! (;`O´)o',
|
||||||
action: onLoginTapped,
|
action: onLoginTapped,
|
||||||
label: 'Log in',
|
label: 'Log in',
|
||||||
);
|
);
|
||||||
} else if (voteState.status ==
|
} else if (voteState.status ==
|
||||||
VoteStatus.failureBeHumble) {
|
VoteStatus.failureBeHumble) {
|
||||||
context.showSnackBar(
|
showSnackBar(
|
||||||
content: 'No voting on your own post! (;`O´)o',
|
content: 'No voting on your own post! (;`O´)o',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import 'package:flutter_fadein/flutter_fadein.dart';
|
|||||||
import 'package:hacki/config/locator.dart';
|
import 'package:hacki/config/locator.dart';
|
||||||
import 'package:hacki/cubits/cubits.dart' show ReminderCubit, ReminderState;
|
import 'package:hacki/cubits/cubits.dart' show ReminderCubit, ReminderState;
|
||||||
import 'package:hacki/extensions/extensions.dart';
|
import 'package:hacki/extensions/extensions.dart';
|
||||||
import 'package:hacki/models/item/story.dart';
|
import 'package:hacki/models/models.dart';
|
||||||
import 'package:hacki/repositories/repositories.dart';
|
import 'package:hacki/repositories/repositories.dart';
|
||||||
import 'package:hacki/screens/screens.dart';
|
import 'package:hacki/screens/screens.dart';
|
||||||
import 'package:hacki/styles/styles.dart';
|
import 'package:hacki/styles/styles.dart';
|
||||||
|
@ -103,8 +103,6 @@ abstract class LinkUtil {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
launch(link);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: hacki
|
name: hacki
|
||||||
description: A Hacker News reader.
|
description: A Hacker News reader.
|
||||||
version: 1.2.1+94
|
version: 1.2.2+95
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
Reference in New Issue
Block a user