Subsequent litigation settled. How to account for it?

I know the The settlement of litigation for an amount different from the liability recorded in the accounts would require adjustment of the financial statements if the events occurred before B/S date. How if a loss is recognized for the litigation and subsequently wins, and got a gain. Shall I recognize the gain on B/S date? As I know the gain should not be recognized on the view of contingency matter. Anyone has an idea?