Commit 442d112
committed
compose: Change content input hint text if topic is empty and mandatory
Previously, "Message #stream > (no topic)" would appear as the hint text
when the topic input is empty but mandatory. Now, it is shown as
"Message #stream" instead, since the "(no topic)" isn't allowed when
topics are mandatory.
The control flow of `String get hintText` can be simplified. However,
it is structured this way to prepare for a later change to support
showing "general chat" in the hint text, that adds some more advanced
checks.
Signed-off-by: Zixuan James Li <zixuan@zulip.com>1 parent a7ff94c commit 442d112
File tree
2 files changed
+76
-13
lines changed- lib/widgets
- test/widgets
2 files changed
+76
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
586 | | - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
587 | 597 | | |
588 | 598 | | |
589 | 599 | | |
590 | 600 | | |
591 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
592 | 621 | | |
593 | 622 | | |
594 | | - | |
| 623 | + | |
| 624 | + | |
595 | 625 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
| 626 | + | |
602 | 627 | | |
603 | 628 | | |
604 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
361 | 399 | | |
362 | 400 | | |
363 | 401 | | |
364 | 402 | | |
365 | 403 | | |
366 | 404 | | |
367 | | - | |
| 405 | + | |
368 | 406 | | |
369 | 407 | | |
370 | 408 | | |
| |||
0 commit comments