Satisfy formatter

This commit is contained in:
Henrik Giesel 2021-01-18 23:27:57 +01:00
parent 4a733de94e
commit a5947e5c65
3 changed files with 17 additions and 11 deletions

View file

@ -230,7 +230,6 @@ impl Collection {
self.set_config(ConfigKey::NewReviewMix, &(mix as u8))
}
pub(crate) fn get_first_weekday(&self) -> Weekday {
match self.get_config_default::<u8, _>(ConfigKey::FirstWeekday) {
1 => Weekday::Monday,

View file

@ -25,7 +25,6 @@ impl Collection {
let offset = self.local_utc_offset_for_user()?;
let local_offset_secs = offset.local_minus_utc() as i64;
let cards = self.storage.all_searched_cards()?;
let revlog = if all {
self.storage.get_all_revlog_entries(revlog_start)?

View file

@ -13,14 +13,21 @@ import { select, mouse } from "d3-selection";
import { scaleLinear, scaleSequential } from "d3-scale";
import { showTooltip, hideTooltip } from "./tooltip";
import { GraphBounds, setDataAvailable, RevlogRange } from "./graph-helpers";
import { timeDay, timeYear, timeSunday, timeMonday, timeFriday, timeSaturday } from "d3-time";
import {
timeDay,
timeYear,
timeSunday,
timeMonday,
timeFriday,
timeSaturday,
} from "d3-time";
import type { CountableTimeInterval } from "d3-time";
import type { I18n } from "anki/i18n";
export interface GraphData {
// indexed by day, where day is relative to today
reviewCount: Map<number, number>;
timeFunction: CountableTimeInterval,
timeFunction: CountableTimeInterval;
}
interface DayDatum {
@ -47,7 +54,8 @@ export function gatherData(data: pb.BackendProto.GraphsOut): GraphData {
reviewCount.set(day, count + 1);
}
let timeFunction = data.firstWeekday === 1
const timeFunction =
data.firstWeekday === 1
? timeMonday
: data.firstWeekday === 5
? timeFriday