nightlan1015297 / collegenius

Collegenius is an application that develop to help student in NCU (National Centeral University 國立中央大學) access school affair or learning related system in school.
MIT License
4 stars 0 forks source link

Course schedule current section early one section #4

Closed nightlan1015297 closed 2 years ago

nightlan1015297 commented 2 years ago

In course schedule page bloc,function [_onUpdateTime] count the current section from one. But when rendering the course schedule, [mapIndexToCurrentSection] map the current section from 0 cause the problem.

nightlan1015297 commented 2 years ago

The problem become normal at afternoon since mapIndexToSection in constants/maps skipped index "4".

nightlan1015297 commented 2 years ago

See implement:


const Map<int, String> mapIndexToSection = {
  0: 'one',
  1: 'two',
  2: 'three',
  3: 'four',
  5: 'Z',
  6: 'five',
  7: 'six',
  8: 'seven',
  9: 'eight',
  10: 'nine',
  11: 'A',
  12: 'B',
  13: 'C',
  14: 'D',
  15: 'E',
  16: 'F'
};