setChannelFetchTime method

Future<void> setChannelFetchTime(
  1. String channel,
  2. int fetchTime
)

Sets the fetch time for a given channel if the new fetchTime is greater than the current fetch time stored in the repository.

Implementation

Future<void> setChannelFetchTime(String channel, int fetchTime) async {
  if (fetchTime > await messageRepository.getChannelFetchTime(channel)) {
    await messageRepository.setChannelFetchTime(channel, fetchTime);
  }
}