finish minimize unread function