Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[x] This is not efficient #19

Closed
github-actions bot opened this issue Apr 24, 2022 · 1 comment
Closed

[x] This is not efficient #19

github-actions bot opened this issue Apr 24, 2022 · 1 comment
Labels

Comments

@github-actions
Copy link

// TODO(x): This is not efficient

    // Loading of messages
    final transactions =
        await _transactionsRepository.getTransactionsFromMessages();
    // TODO(x): This is not efficient
    for (final tx in state.transactions) {
      if (tx.categoryId != unCategorizedCategory.id) {
        final idx = transactions.indexWhere((element) => element.ref == tx.ref);
        if (idx != -1) {
          transactions[idx] =
              transactions[idx].copyWith(categoryId: tx.categoryId);
        }
      }
    }
    emit(
      state.copyWith(
        transactions: transactions,
@github-actions
Copy link
Author

Closed in eee2248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants