Skip to content

Commit

Permalink
Fix language UI
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin committed Jan 6, 2025
1 parent f67eb12 commit 28a06dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/lib/pages/conversations/widgets/search_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class _SearchWidgetState extends State<SearchWidget> {
return IconButton(
onPressed: convoProvider.toggleDiscardConversations,
icon: Icon(
convoProvider.showDiscardedConversations ? Icons.filter_list_off_sharp : Icons.filter_list,
convoProvider.showDiscardedConversations ? Icons.filter_alt_off_sharp : Icons.filter_alt_sharp,
color: Colors.white,
size: 24,
),
Expand Down
3 changes: 1 addition & 2 deletions app/lib/pages/home/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,14 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
child: const Text('Apps', style: TextStyle(color: Colors.white, fontSize: 18)),
);
} else {
return Flexible(
return Expanded(
child: Row(
children: [
const Spacer(),
SpeechLanguageSheet(
recordingLanguage: provider.recordingLanguage,
setRecordingLanguage: (language) {
provider.setRecordingLanguage(language);

// Notify capture provider
if (context.mounted) {
context.read<CaptureProvider>().onRecordProfileSettingChanged();
Expand Down
18 changes: 5 additions & 13 deletions app/lib/pages/home/widgets/speech_language_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,22 @@ class SpeechLanguageSheet extends StatelessWidget {
);
},
child: Container(
width: MediaQuery.of(context).size.width * 0.18,
height: MediaQuery.of(context).size.height * 0.0375,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey.shade900,
),
padding: const EdgeInsets.only(left: 8, right: 2),
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 4),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const Icon(
Icons.language,
color: Colors.white,
size: 20,
),
const Spacer(
flex: 2,
size: 24,
),
const SizedBox(width: 4),
Text(
SharedPreferencesUtil().recordingsLanguage.toUpperCase(),
style: const TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 14),
textAlign: TextAlign.center,
),
const Spacer(
flex: 3,
style: const TextStyle(color: Colors.white, fontSize: 14, fontWeight: FontWeight.bold),
),
],
),
Expand Down
7 changes: 7 additions & 0 deletions app/lib/providers/conversation_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ class ConversationProvider extends ChangeNotifier implements IWalServiceListener
}

Future getInitialConversations() async {
// reset search
previousQuery = "";
currentSearchPage = 0;
totalSearchPages = 0;
searchedConversations = [];

// fetch convos
conversations = await getConversationsFromServer();

processingConversations = conversations.where((m) => m.status == ConversationStatus.processing).toList();
Expand Down

0 comments on commit 28a06dc

Please sign in to comment.