Compare commits

..

4 Commits

Author SHA1 Message Date
4d94c85e81 fixed submit cubit. 2022-02-19 22:09:02 -08:00
d97dea258e added title length limit. 2022-02-19 11:24:36 -08:00
da898c37cc updated README.md 2022-02-19 10:31:02 -08:00
7e05aa825d added store badges. 2022-02-19 10:28:06 -08:00
8 changed files with 20 additions and 10 deletions

View File

@ -11,6 +11,8 @@ A simple Hacker News reader made with Flutter.
<noscript><a href="https://liberapay.com/jfeng_for_open_source/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
[<img src="images/app_store_badge.png" height="50">](https://apps.apple.com/us/app/hacki/id1602043763) [<img src="images/google_play_badge.png" height="50">](https://play.google.com/store/apps/details?id=com.jiaqifeng.hacki&hl=en_US&gl=US)
Features:
- Log in using your Hacker News account.

BIN
images/app_store_badge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -365,7 +365,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.5;
MARKETING_VERSION = 0.1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.jiaqi.hacki;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -500,7 +500,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.5;
MARKETING_VERSION = 0.1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.jiaqi.hacki;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -529,7 +529,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.1.5;
MARKETING_VERSION = 0.1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.jiaqi.hacki;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -35,11 +35,9 @@ class SubmitCubit extends Cubit<SubmitState> {
text: state.text,
)
.then((successful) {
if (successful) {
emit(state.copyWith(status: SubmitStatus.submitted));
} else {
emit(state.copyWith(status: SubmitStatus.failure));
}
emit(state.copyWith(status: SubmitStatus.submitted));
}).onError((error, stackTrace) {
emit(state.copyWith(status: SubmitStatus.failure));
});
}
}

View File

@ -377,7 +377,7 @@ class _ProfileScreenState extends State<ProfileScreen>
showAboutDialog(
context: context,
applicationName: 'Hacki',
applicationVersion: 'v0.1.5',
applicationVersion: 'v0.1.6',
applicationIcon: Image.asset(
Constants.hackiIconPath,
height: 50,

View File

@ -26,12 +26,21 @@ class _SubmitScreenState extends State<SubmitScreen> {
final urlEditingController = TextEditingController();
final textEditingController = TextEditingController();
@override
void dispose() {
super.dispose();
titleEditingController.dispose();
urlEditingController.dispose();
textEditingController.dispose();
}
@override
Widget build(BuildContext context) {
return BlocConsumer<SubmitCubit, SubmitState>(
listenWhen: (previous, current) => previous.status != current.status,
listener: (context, state) {
if (state.status == SubmitStatus.submitted) {
Navigator.pop(context);
showSnackBar(
content: 'Post submitted successfully.',
);
@ -123,6 +132,7 @@ class _SubmitScreenState extends State<SubmitScreen> {
controller: titleEditingController,
cursorColor: Colors.orange,
autocorrect: false,
maxLength: 80,
decoration: const InputDecoration(
hintText: 'Title',
focusedBorder: UnderlineInputBorder(

View File

@ -1,6 +1,6 @@
name: hacki
description: A Hacker News reader.
version: 0.1.5+20
version: 0.1.6+21
publish_to: none
environment: