If, on the final hearing of the complaint or petition herein provided, the officer is not removed from office, the officer shall, if the officer has been suspended, be immediately restored to office, and be allowed the officer's full costs and the salary and fees of the officer's office during the time of the officer's suspension, as the case may be, against the state, county, or municipality, to be taxed and paid as in other cases. Such officer so temporarily filling the office shall receive the same salary and fees as is provided by law to be paid to the officer so suspended. After final hearing on the complaint or petition, any public officer not removed from office, or if the officer has been suspended, any officer immediately restored to office, may be reimbursed reasonable attorney fees by the appropriate state, county, municipality, or other political subdivision. If either party appeals pursuant to § 8-47-123, no such reimbursement shall be made until a final judgment is rendered.